public void UpdateExpiryTime(int timeToExpireInSeconds) { string[] keyArgs = new string[] { Keys.DataKey, Keys.InternalKey }; object[] valueArgs = new object[1]; valueArgs[0] = timeToExpireInSeconds; redisConnection.Eval(updateExpiryTimeScript, keyArgs, valueArgs); }
public object Add(string key, object entry, DateTime utcExpiry) { key = GetKeyForRedis(key); TimeSpan expiryTime = utcExpiry - DateTime.UtcNow; string[] keyArgs = new string[] { key }; object[] valueArgs = new object[] { redisUtility.GetBytesFromObject(entry), (long)expiryTime.TotalMilliseconds }; object rowDataFromRedis = redisConnection.Eval(addScript, keyArgs, valueArgs); return(redisUtility.GetObjectFromBytes(redisConnection.GetOutputCacheDataFromResult(rowDataFromRedis))); }