7

After upgrading to Sitecore 8.2 Update-5 recently I was looking in our CD server's logs and noticed a large number of warnings around the AccessResultCache:

7792 14:52:05 WARN AccessResultCache cache is cleared by Sitecore.Caching.Generics.Cache'1+DefaultScavengeStrategy[[Sitecore.Caching.AccessResultCacheKey, Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]] strategy. Cache running size was 8.8 MB.

7792 14:52:05 WARN AccessResultCache cache is cleared by Sitecore.Caching.Generics.Cache'1+DefaultScavengeStrategy[[Sitecore.Caching.AccessResultCacheKey, Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]] strategy. Cache running size was 9 MB.

7792 14:52:05 WARN AccessResultCache cache is cleared by Sitecore.Caching.Generics.Cache'1+DefaultScavengeStrategy[[Sitecore.Caching.AccessResultCacheKey, Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]] strategy. Cache running size was 9 MB.

7792 14:52:05 WARN AccessResultCache cache is cleared by Sitecore.Caching.Generics.Cache'1+DefaultScavengeStrategy[[Sitecore.Caching.AccessResultCacheKey, Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]] strategy. Cache running size was 9 MB.

7792 14:52:06 WARN AccessResultCache cache is cleared by Sitecore.Caching.Generics.Cache'1+DefaultScavengeStrategy[[Sitecore.Caching.AccessResultCacheKey, Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]] strategy. Cache running size was 9 MB.

7792 14:52:06 WARN AccessResultCache cache is cleared by Sitecore.Caching.Generics.Cache'1+DefaultScavengeStrategy[[Sitecore.Caching.AccessResultCacheKey, Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]] strategy. Cache running size was 9 MB.

7792 14:52:06 WARN AccessResultCache cache is cleared by Sitecore.Caching.Generics.Cache'1+DefaultScavengeStrategy[[Sitecore.Caching.AccessResultCacheKey, Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]] strategy. Cache running size was 9 MB.

Before upgrading and reverting back to the (in some cases new) default cache sizes, we had Caching.AccessResultCacheSize set to 2MB, and don't see this cache clearing message.

Looking into this further it appears that on CD server's we can set the size to 0 if we're not using it, but I'm not sure of the best way to determine if we have legacy code that is relying upon this, or if we have any content that may be restricted.

What's the best way to determine if Caching.AccessResultCacheSize can be set to 0 on a CD server? And is there a reason we might be seeing this message more with a larger cache size, after upgrading from 7.2.current?

1 Answer 1

1

Every time when anybody accesses any item in Sitecore result of resolved security right is put to AccessResultCache. It is not related to content editing, but to content accessing.

So you can have it set to 0 as I’m pretty sure you are not using sitecore security on the frontend for a user to see sitecore items.

Even though, one check you can perform is to see the cache on the cache.aspx page. The flow is as follows:

  1. Navigate to the domain.com/sitecore/admin/cache.aspx and note down the value of the AccessResultCache.

  2. Navigate and browse some pages on your site.

  3. Navigate back to the cache.aspx page and see if the value for the AccessResultCache has increased.

But from my point of view, this cache can be disabled on CD Servers.

4
  • Just to confirm, "using sitecore security on the frontend for a user to see sitecore items" meaning using the Security Editor and locking down content so that it's not by default readable by anonymous users? Dec 5, 2017 at 21:54
  • Yes. Normally the frontend is the live site and it is only for displaying the contents to the users. So, I’m pretty much sure that you are not performing sitecore security check before items are viewed on the live site Dec 5, 2017 at 21:56
  • Sorry for the delay: just waiting for a better day, when I know I'll be in the office for a few hours after and the following day, to make this switch and test. Dec 7, 2017 at 16:23
  • 1
    It appears that by disabling the access cache CPU is consistently higher than without it, and we run into spikes of 100%. Making no other change than disabling the patch file results in CPU usage going back down to normal levels, but once again the logs fill with the message. So, something is going on. Dec 19, 2017 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.