public void Delete(ICacheKey key) { if (this.cache.ContainsKey(key.GetName())) { this.cache.Remove(key.GetName()); } }
public TResult Get <TResult>(ICacheKey key) where TResult : class { lock (cacheBuffer.GetOrAdd(key.GetName(), key)) { if (IsExpires(key)) { Delete(key); } return(this.init.Provider.Get <TResult>(key)); } }
public void Set <T>(ICacheKey key, T instance) where T : class { this.cache.Set(key.GetName(), instance); }
public T Get <T>(ICacheKey key) where T : class { return(this.cache.ContainsKey(key.GetName()) ? this.cache[key.GetName()] as T : null); }
public void Set <T>(ICacheKey key, T instance) where T : class { Guard.NotNull("key", key); this.memcached.Store(StoreMode.Set, key.GetName(), instance); }
public T Get <T>(ICacheKey key) where T : class { Guard.NotNull("key", key); return(this.memcached.Get <T>(key.GetName())); }
public void Delete(ICacheKey key) { Guard.NotNull("key", key); this.memcached.Remove(key.GetName()); }
public TResult Get <TResult>(ICacheKey key) { return(Get <TResult>(key.GetName())); }
public TResult Retrieve <TResult>(ICacheKey key, Func <TResult> callback, CacheOptions cacheOptions = null) { return(Retrieve(key.GetName(), callback, cacheOptions)); }
public void Delete(ICacheKey key) { HttpRuntime.Cache.Remove(key.GetName()); }
public void Delete(ICacheKey key) { this.init.Provider.Delete(key.GetName()); }
public void Set <T>(ICacheKey key, T instance) where T : class { HttpRuntime.Cache.Insert(key.GetName(), instance); }
public T Get <T>(ICacheKey key) where T : class { return(HttpRuntime.Cache.Get(key.GetName()) as T); }
public void Set <T>(ICacheKey key, T instance) where T : class { this.memcached.Store(StoreMode.Set, key.GetName(), instance); }
public T Get <T>(ICacheKey key) where T : class { return(this.memcached.Get <T>(key.GetName())); }
public void Delete(ICacheKey key) { this.memcached.Remove(key.GetName()); }