mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
TTL command fixed to work reliably with diskstore
This commit is contained in:
parent
8b108ed307
commit
15db4aa006
1
src/db.c
1
src/db.c
@ -592,6 +592,7 @@ void expireatCommand(redisClient *c) {
|
|||||||
void ttlCommand(redisClient *c) {
|
void ttlCommand(redisClient *c) {
|
||||||
time_t expire, ttl = -1;
|
time_t expire, ttl = -1;
|
||||||
|
|
||||||
|
if (server.ds_enabled) lookupKeyRead(c->db,c->argv[1]);
|
||||||
expire = getExpire(c->db,c->argv[1]);
|
expire = getExpire(c->db,c->argv[1]);
|
||||||
if (expire != -1) {
|
if (expire != -1) {
|
||||||
ttl = (expire-time(NULL));
|
ttl = (expire-time(NULL));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user