Question

I am using MS Enterprise caching block and would like to log messages when scavenging for caching kicks in. I would like to know exactly when the cache is expired and it has to be hydrated. when I get data from cache if its null then its possible that it has been scavenged. I would like to know exactly when that happened.

Is it possible to do so. Searching the google and reading up the documentation did not provide any information so far.

Please help.

Was it helpful?

Solution

Seems that you need to roll your own IBackingStore, example:

public class MyBackingStoreLog : IBackingStore
{
    // TODO: Implement all IBackingStore, pay attention to the Remove method
    public void Remove(string key)
    {
        Log(string.format("{0} was just removed from cache", key));
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top