I'm using simple ObjectCache
and MemoryCache
class to implement cache.
public class MemoryCacheManager
{
protected ObjectCache Cache
{
get
{
return MemoryCache.Default;
}
}
/// <summary>
/// Gets or sets the value associated with the specified key.
public virtual T Get<T>(string key)
{
return (T)Cache[key];
}
I want to add method to check empty cache but not based on any key only wanted to check whether whole cache is empty or not how can I do so ?