Exemple #1
0
 /// <summary>
 /// 根据失效时间获取缓存
 /// <para>李玉宝于2016-11-08 16:54:04</para>
 /// </summary>
 /// <param name="key">The key.</param>
 public T GetCache(string key)
 {
     return(CacheContext.Get <T>(key));
 }
Exemple #2
0
 public void Remove(string key)
 {
     CacheContext.Remove(key);
 }
Exemple #3
0
 public bool Create(string key, T val, DateTime expire)
 {
     //设置缓存
     return(CacheContext.Set <T>(key, val, expire));
 }