0

我正在使用 MS Enterprise 缓存块,并希望在清理缓存启动时记录消息。我想确切地知道缓存何时过期并且必须补水。当我从缓存中获取数据时,如果它为空,那么它可能已被清除。我想知道那是什么时候发生的。

有没有可能这样做。到目前为止,搜索谷歌并阅读文档并没有提供任何信息。

请帮忙。

4

1 回答 1

1

似乎您需要推出自己的 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));
    }
}
于 2012-05-21T06:28:55.777 回答