Question

Looking at caching settings in the web.config I came across the Caching.ScavengeInterval entry:

<!--  SCAVENGE INTERVAL
Determines how often scavengable caches are scavenged.
Default value: 3 minutes.
-->
<setting name="Caching.ScavengeInterval" value="00:03:00" />

Which caches does it affect, and is there automatic cache scavenging built in to Sitecore? What does Cache scavenging do in a Sitecore context?

I'm particularly interested in whether it affects IsUserInRole caching.

Was it helpful?

Solution

This isn't going to answer your question directly, but hopefully it will give a push in the right direction.

You can use Sitecore Rocks to view the current caches, there is a column which tells you which caches are flagged to be scavengable:

http://www.sitecore.net/Community/Technical-Blogs/Trevor-Campbell/Posts/2013/02/28-Days-of-Sitecore-Rocks-Manage-Part-3.aspx

On a default install of Sitecore it only affects GeoIp and ClientDataStore. Unfortunately:

The client data store cache stores information about each authenticated user, such as the username or other user properties.

Sitecore Cache Configuration Guide - page 20

That is the wrong cache for your needs, you are interested in the IsUserInRoleCache and that is flagged as Scavengable:false

You can dig into yourself, use dotPeek decompiler and take a look at the following class in Sitecore.Kernel.dll:

  • Sitecore.Caching.Cache
  • Sitecore.Caching.CacheManager
  • Sitecore.Configuration.ClientDataStore
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top