コード例 #1
0
 public static void CacheEkle(string key, object value, int expireAsMinute)
 {
     if (_cache.Any(x => x.Key == key))
     {
         _cache.Remove(key);
     }
     _cache.Add(key, value, DateTimeOffset.Now.AddMinutes(expireAsMinute));
 }
コード例 #2
0
        public bool IsExist(string key)
        {
            System.Diagnostics.Contracts.Contract.Assert(!string.IsNullOrEmpty(key));

            return(_cache.Any(i => i.Key == key));
        }