From 15db4aa00636e8ec60767fedec364a7d66ccb26c Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 4 Mar 2011 15:49:01 +0100 Subject: [PATCH] TTL command fixed to work reliably with diskstore --- src/db.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/db.c b/src/db.c index 669fba13..9daa5ddb 100644 --- a/src/db.c +++ b/src/db.c @@ -592,6 +592,7 @@ void expireatCommand(redisClient *c) { void ttlCommand(redisClient *c) { time_t expire, ttl = -1; + if (server.ds_enabled) lookupKeyRead(c->db,c->argv[1]); expire = getExpire(c->db,c->argv[1]); if (expire != -1) { ttl = (expire-time(NULL)); -- 2.45.2