protected void SetDepend(string key, object output) { MemCachedStrategy mc = new MemCachedStrategy(); mc.TimeOut = MemcachedCacheTime; mc.AddObject(key, output); }
protected void SetDepend(string key, object output, string dependKey, int timeout) { MemCachedStrategy mc = new MemCachedStrategy(); mc.TimeOut = timeout; mc.AddObjectWithDepend(key, output, dependKey); }
public void SetDepend(string key, object output, string dependKey) { MemCachedStrategy mc = new MemCachedStrategy(); mc.TimeOut = MemcachedCacheTime; string[] temp = { dependKey }; mc.AddObjectWithDepend(key, output, temp); }
protected object GetDepend(string key) { try { MemCachedStrategy mc = new MemCachedStrategy(); return(mc.RetrieveObject(key)); } catch { return(null); } }
protected void DeleteDepend(string key) { MemCachedStrategy mc = new MemCachedStrategy(); mc.RemoveObject(key); }
/// <summary> /// 刷新缓存 /// </summary> protected void FlushDependkey() { MemCachedStrategy mc = new MemCachedStrategy(); mc.AddObject(dependkey, 1); }
public object GetDepend(string key) { MemCachedStrategy mc = new MemCachedStrategy(); return(mc.RetrieveObject(key)); }