mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
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…
x
Reference in New Issue
Block a user