Return the time to live for a key set to expire.
She the time left to live in seconds (redisTTL) or milliseconds (redisPTTL) for the specified key.
redisTTL(key) redisPTTL(key)
key |
The key to look up. |
Redis keys may be set to exipre at or after a given time with
the redisExpire
and redisExpireAt
functions. This function
shows the time left before exipraton in seconds for such a key.
A Redis string value representtion of the integer time left to live or -1 if the key is not set to expire or -2 if not found.
B. W. Lewis
http://redis.io/commands
## Not run: redisConnect() redisSet('x',5) redisExpire('x',100) redisTTL('x') ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.