From 26b9dc77dd563bc7c34c9ce584e5de4777b0db65 Mon Sep 17 00:00:00 2001 From: Andrew Hoff Date: Wed, 7 Nov 2018 10:18:14 -0600 Subject: [PATCH] quick bug fix --- drivers/store/redis/store.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/store/redis/store.go b/drivers/store/redis/store.go index 30c5a99..b976a91 100644 --- a/drivers/store/redis/store.go +++ b/drivers/store/redis/store.go @@ -230,11 +230,11 @@ func updateValue(rtx *libredis.Tx, key string, expiration time.Duration) (int64, return 0, 0, err } - // If ttl is -1, we have to define key expiration. + // If ttl is -1ms, we have to define key expiration. // PTTL return values changed as of Redis 2.8 - // Now the command returns -2 if the key does not exist, and -1 if the key exists, but there is no expiry set + // Now the command returns -2ms if the key does not exist, and -1ms if the key exists, but there is no expiry set // We shouldn't try to set an expiry on a key that doesn't exist - if ttl == -1 { + if ttl == (-1 * time.Millisecond) { expire := rtx.Expire(key, expiration) ok, err := expire.Result()