mirror of https://mirror.osredm.com/root/redis.git
Don't set expire to keys with ttl=0, remove them immediately.
This commit is contained in:
parent
bc55456975
commit
d4dd6556c3
2
redis.c
2
redis.c
|
@ -7072,7 +7072,7 @@ static void expireGenericCommand(redisClient *c, robj *key, robj *param, long of
|
||||||
addReply(c,shared.czero);
|
addReply(c,shared.czero);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (seconds < 0) {
|
if (seconds <= 0) {
|
||||||
if (deleteKey(c->db,key)) server.dirty++;
|
if (deleteKey(c->db,key)) server.dirty++;
|
||||||
addReply(c, shared.cone);
|
addReply(c, shared.cone);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue