Learn R Programming

rredis (version 1.7.0)

redisExpireAt: Set a timeout on the specified key.

Description

Set a timeout on the specified key, after which time the key and corresponding value will be deleted.

Usage

redisExpireAt(key, time) redisPexpireAt(key, time)

Arguments

key
The character key on which to set the timeout.
time
The UNIX time of expiration in seconds or milliseconds.

Value

Boolean TRUE if the timeout command was successful, FALSE otherwise.

Details

Operations that modify value(s) corresponding to a key subsequent to the redisExpireAt function clear the timeout, removing the expiration. The redisExpireAt function can't set a new timeout value once a timeout has been set on a key.

References

http://redis.io/commands

See Also

redisExpire

Examples

Run this code
## Not run: 
# redisConnect()
# redisLPush('x',runif(5))
# redisExpireAt('x', 1266209144)
# ## End(Not run)

Run the code above in your browser using DataLab