예제 #1
0
        public long UpdateTTL_Item(string key, string ttl)
        {
            if (string.IsNullOrWhiteSpace(key) || string.IsNullOrWhiteSpace(ttl))
            {
                throw new ArgumentException("Parameter is invalid.", "key or ttl", null);
            }

            try
            {
                StackExchange.Redis.RedisValue[] _v = new StackExchange.Redis.RedisValue[1];
                _v[0] = ttl;
                _db.ListSetByIndex(key, 0, _v[0]);
                return(1);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            { }
        }