Enable cache key indexing

Version:
Applies toContent Delivery, Content Management
Note

Cache key indexing requires Sitecore to maintain additional cache metadata. This introduces additional processing and memory overhead. For this reason, cache key indexing is disabled by default and should be evaluated and tested before being enabled in production environments. Consider enabling cache key indexing for large solutions where cache-related operations become a performance bottleneck.

Cache key indexing can significantly reduce the time it takes to perform operations on a large cache, and is particularly useful in large solutions where items are frequently renamed, moved, copied, and deleted. Cache key indexing is available for the following caches:

  • Access Result cache
  • Item cache
  • Item paths cache
  • Paths cache

To enable cache key indexing:

  • Create a patch file and set all cache key indexing settings to true as shown. The following example enables cache key indexing on the Content Delivery and Standalone roles only:

    <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>
If you have suggestions for improving this article, let us know!