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:
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