Views: 183
Last Modified: 07.09.2022

  Managed cache

Technology of managed caching or tagged cache (Сache Dependencies) automatically updates component cache when editing the data. In case the managed cache is enabled, you won't need to manually update component cache, for example, when editing news items or products: the changes become visible to site visitors. Managed cache is stored in files of catalog /bitrix/managed_cache/.

This significantly simplifies the content manager operation and speeds up the site due to editor-processed content being already passed from cache.

Attention! Not all components can support managed cache. You need to check in component settings if this component individually supports managed caching.

Enabling managed cache is performed at the Managed cache parameter page.

Note: Сache Dependencies technology, just as the complete product can store cache in files using both b>Memcached and APC.

It's unreasonable to use tagged cache for a frequently updated volume of data, it's better to use standard caching instead.

Tagged cache for an information block is reset when adding/updating/deleting an element, section, iblock property and operations with this iblock and permissions for iblock.

Additionally, tagged cache is reset for catalog components when editing a currency and its rates (in case the database had products displayed with prices in this currency), as well as when editing a displayed currency (in case of enabled single currency display).

For example: the system has 2 currencies: EUR, USD. The product details' prices are indicated in EUR (i. e. saved in the database in this currency). Component displays products in Euros. If currency is changed to EUR, cache is reset. Editing other currencies (USD or EUR) won't affect the cache.
In case the component displays a product in currency unavailable in the product details, (e. g. NZD) the cache will be also reset when changing NZD as well.

  Unmanaged cache

This standard cache option can specify caching rules for compute-intensive page sections. Caching results are saved as files in catalog /bitrix/cache/. If caching time didn't expire, a specially created cache file will be connected instead of compute-intensive code. Caching is called "unmanaged", because cache is not realigned automatically after modification of source data and continues to be active after being created for a time period, indicated in component parameters.

Note: For this type of caching to be active, you must disable Managed cache for a complete project altogether. Otherwise, unmanaged cache will be reset by Managed cache parameters.
If you need for a portion of cache to be managed, and a portion to be unmanaged, you need to customize components necessary for the unmanaged cache.


Courses developed by Bitrix24