Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

redisTTL

Return the time to live for a key set to expire.


Description

She the time left to live in seconds (redisTTL) or milliseconds (redisPTTL) for the specified key.

Usage

redisTTL(key)
redisPTTL(key)

Arguments

key

The key to look up.

Details

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.

Value

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.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

Examples

## Not run: 
redisConnect()
redisSet('x',5)
redisExpire('x',100)
redisTTL('x')

## End(Not run)

rredis

"Redis" Key/Value Database Client

v1.7.0
Apache License (>= 2.0)
Authors
B. W. Lewis
Initial release
2015-07-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.