Example #1
0
        public void Add(string key, object value, ICacheExpired cacheExpired)
        {
            var policy = new CacheItemPolicy();
            if (cacheExpired.IsExpired)
            {
                if (cacheExpired.Sliding)
                    policy.SlidingExpiration = cacheExpired.SlidingExpiration;
                else
                {
                    policy.AbsoluteExpiration = cacheExpired.AbsoluteExpiration;
                }
            }

            _localCache.Set(key, value, policy, _region);
        }
Example #2
0
 public void Add(string key, object value, ICacheExpired cacheExpired)
 {
     if (cacheExpired.IsExpired)
     {
         if (cacheExpired.Sliding)
             memcachedClient.Set(key, value, cacheExpired.SlidingExpiration);
         else
         {
             memcachedClient.Set(key, value, cacheExpired.AbsoluteExpiration);
         }
     }
     else
     {
         memcachedClient.Set(key, value);
     }
 }
Example #3
0
 public void Add(string key, object value, ICacheExpired cacheExpired)
 {
     throw new System.NotImplementedException();
 }