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.
Cache Basics. Sitecore uses various caches to store data, rendered presentation logic and other information in memory in order to improve performance and response time. A cache is a dictionary that keeps track of when each entry is accessed. The data that is stored for each entry depends on the cache.
Sitecore populates database prefetch caches at application initialization, and maintains those caches over the life of the application.
Caching to improve performance. You can improve the load time of your SXA web pages by setting the caching options for the SXA renderings. The SXA HTML cache minimizes the number of times Sitecore processes renderings. This is very important, especially if you have renderings that iterate over a large amount of items.
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
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With