From: antirez Date: Fri, 4 Mar 2011 14:49:01 +0000 (+0100) Subject: TTL command fixed to work reliably with diskstore X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/15db4aa00636e8ec60767fedec364a7d66ccb26c?hp=8b108ed3075f56d5d261e41e03c8e1fcfd764451 TTL command fixed to work reliably with diskstore --- 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));