public override void Remove(CacheItem item, string key, bool isMainSlbServer = true) { var cacheKey = GenerateCacheKey(item, key); if (CachePool.Contains(cacheKey)) { CachePool.Remove(cacheKey); } }
public override object Get(CacheItem item, string key, MethodInfo methodInfo) { var cacheKey = GenerateCacheKey(item, key); if (CachePool.Contains(cacheKey)) { return((object)CachePool[cacheKey]); } return(null); }
public override void Set(CacheItem item, string key, object data, int second = 0) { if (data == null) { return; } var cacheKey = GenerateCacheKey(item, key); if (CachePool.Contains(cacheKey)) { CachePool[cacheKey] = data; } else { CachePool.Add(cacheKey, data, GetPolicy(second)); } }