예제 #1
0
 public void Add(string cacheItemKey, T cacheItem, int secondsToExpire)
 {
     using (var redisClient = new BasicRedisClientManager(this.hostName).GetClient())
     {
         redisClient.Add(cacheItemKey, cacheItem, DateTime.Now.AddSeconds(secondsToExpire));
     }
 }
예제 #2
0
 public void Add(string cacheItemKey, T cacheItem)
 {
     using (var redisClient = new BasicRedisClientManager(this.hostName).GetClient())
     {
         redisClient.Add(cacheItemKey, cacheItem);
     }
 }