应用程序块缓存扫除事件
-
12-12-2019 - |
题
我正在使用MS Enterprise Caching块,并希望在扫除缓存时记录邮件。我想在缓存到期时确切地知道它必须是水合的。当我从缓存中获取数据时,如果它的null然后它可能被清除。我想在发生这种情况时完全了解。
可以这样做。搜索谷歌并读取文档目前没有提供任何信息。
请帮助。
解决方案
似乎需要滚动自己的IBackingStore,例如:
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));
}
}
. 不隶属于 StackOverflow