Views: 560 (Data available since 06.02.2017)
Last Modified: 18.09.2014
One of the types of caching in Bitrix Framework is component caching.
Components must use caching in order to process the client’s request faster and to reduce the server load. As a rule, the information that is not dependent on a specific visitor must be cached. For example, the list of website news is the same for all visitors. That is why it makes no sense to select the data from the database each time.
All dynamic components that are used in order to create web pages have an embedded support of cache control. In order to use the technique, it is sufficient to activate auto cache by clicking a button on the administrative panel. This feature comes in handy at the developing stage when auto cache can be deactivated to make the work easier, and activated again before delivery of the project. In this case, all of the components with auto cache mode activated in their settings will create caches and will entirely switch to a work mode that does not involve database queries.
Attention! When using the Autocache mode mode (Components cache), the information retrieved by the components is updated according to the parameters of separate components.
Auto cache control is located on the tab Component caching (Control Panel > Settings > System settings > Cache Settings).
Note: When component auto cache mode is activated, the components with the caching setting Auto + Managed will be switched to a work mode with caching.
In order to update the contents of cached objects on a page, you can:
- Go to the required page and update its contents using the button Refresh Cache on the control panel.
- In Edit Mode use the flush cache buttons on panels of specific components.
- Use automatic cache reset upon the expiry of caching time; for this, select the caching mode Cache or Auto + Managed in the component settings.
- Use automatic cache reset when data are changed; for this, select the caching mode Auto + Managed in the component settings.
- Go to the settings of the selected components and switch them to the work mode without caching.