Are you getting a lot of these messages in your Sitecore log:
6052 2021:03:25 05:23:12 WARN AccessResultCache cache is cleared by Sitecore.Caching.Generics.Cache`1+DefaultScavengeStrategy[[Sitecore.Caching.AccessResultCacheKey, Sitecore.Kernel, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null]] strategy. Cache running size was xxx MB.
This message can easily appear once every minute.
WHAT IS THE ACCESSRESULTCACHE?
Every time a user accesses an item, the security rights to that item is put into the accessresultcache.
WHY IS THE CACHE CLEARED SO OFTEN?
Sitecore have chosen a relatively low value as cache. This value suits smaller sites perfectly, but larger sites will suffer.
Also, remember that it is every item that is being read that is cached. So If you have a dropdown or a tree view, these items are read and cached too. Looking up one item in Sitecore might trigger a cascade reading of 100-s of items.
WHAT TO DO THEN?
You can increase the cache size easily:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> <sitecore> <settings> <setting name="Caching.AccessResultCacheSize" set:value="300MB"/> </settings> </sitecore> </configuration>
CAN YOU DISABLE THE ACCESSRESULTCACHE?
Yes. If all of your Sitecore editors are admins anyway, you can disable the cache. You can also disable the cache on the CD servers if there is no security protected areas on your site. You disable the security per database:
<?xml version="1.0" encoding="utf-8" ?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> <sitecore> <databases> <database id="web"> <securityEnabled>false</securityEnabled> </database> </databases> </sitecore> </configuration>
MORE TO READ:
- Configure Access Result cache values from Sitecore
- Analysis of an issue with Sitecore AccessResultCache running full and being cleared continuously despite large cache size by Oliver Raduner
- Performance crime: config to kill performance by Nikolay Mitikov