From 70d848e1faff36e778f8e32c5a86628574c22b00 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 2 Apr 2012 11:14:47 +0200 Subject: [PATCH] RESTORE ability to set a TTL fixed, bug introduced with millisecond expires. --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index a0dd6519..308d3bf7 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1577,7 +1577,7 @@ void restoreCommand(redisClient *c) { /* Create the key and set the TTL if any */ dbAdd(c->db,c->argv[1],obj); - if (ttl) setExpire(c->db,c->argv[1],time(NULL)+ttl); + if (ttl) setExpire(c->db,c->argv[1],mstime()+ttl); signalModifiedKey(c->db,c->argv[1]); addReply(c,shared.ok); server.dirty++;