Beispiel #1
0
 /// <summary>
 /// 根据失效时间获取缓存
 /// <para></para>
 /// </summary>
 /// <param name="key">The key.</param>
 public T GetCache(string key)
 {
     return(CacheContext.Get <T>(key));
 }
Beispiel #2
0
 public void Remove(string key)
 {
     CacheContext.Remove(key);
 }
Beispiel #3
0
 public bool Create(string key, T val, DateTime expire)
 {
     //设置缓存
     return(CacheContext.Set <T>(key, val, expire));
 }