I'm trying to trigger something in the event that Sitecore clears one of my custom caches (implementing
Sitecore.Caching.CustomCache) when it gets full.
I can monitor the cache size compared to its maximum capacity in the Sitecore cache viewer, and simulate a scenario where the cache gets full and sitecore automatically clears it. However, Sitecore does not seem to fire the
Sitecore.Caching.Generics.CustomCache<TKey>.Clear() method, so I can't hook into it.
I can call
Sitecore.Caching.CustomCache.Clear() manually to do the same thing, but whatever Sitecore is doing under the hood is something different.
How can I hook into this event?