Sitecore continuously introduces new concepts and mechanisms. Many developers easily miss to fully appreciate the advantages of these hidden features until they accidentally come across them. This blog post focuses on Cache key indexing, a discovery I made while investigating cache optimization techniques.
Premise
If you have a website or a multi-site that is of considerable size, such as having numerous articles or a vast directory of individuals from your company, incorporating a variety of components with distinct templates, languages, and versions can be beneficial. Additionally, introducing elements that are constantly changing, copied, or deleted is a common practice.
If you are using Azure and find this scenario relatable, utilizing cache key indexing can potentially address any performance issues that your site may encounter.
What is Cache key indexing?
Cache key indexing offers a valuable solution in optimizing the performance of operations on a sizable cache. This technique proves especially beneficial in extensive systems where items undergo frequent renaming, moving, copying, and deletion. The feature of cache key indexing is accessible for the following caches:
- Access Result cache
- Item cache
- Item paths cache
- Paths cache
Steps to set up Cache key indexing
To enable cache key indexing on the Content Delivery and Standalone roles, create a patch file and set all cache key indexing settings to true.:
<configuration
xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<settings>
<setting name="Caching.CacheKeyIndexingEnabled.AccessResultCache" set:value="true"/>
<setting name="Caching.CacheKeyIndexingEnabled.ItemCache" set:value="true"/>
<setting name="Caching.CacheKeyIndexingEnabled.ItemPathsCache" set:value="true"/>
<setting name="Caching.CacheKeyIndexingEnabled.PathCache" set:value="true"/>
</settings>
</sitecore>
</configuration>
Once the testing phase is complete, proceed to transfer the system to your production environment. If everything goes smoothly, you will observe a noticeable enhancement.
Hope it helps you!!
Comments
Post a Comment