redis.expire {rediscc} | R Documentation |
redis.expire
set lifetime of key to expire in seconds
redis.expire(rc, key, seconds)
rc |
Redis connection as returned by |
key |
key associated with the counter |
seconds |
Number of seconds after which the key should expire |
Set a timeout on key. After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is often said to be volatile in Redis terminology.
It is possible to call EXPIRE using as argument a key that already has an existing expire set. In this case the time to live of a key is updated to the new value.
integer, resulting 1 success 0 failure
Simon Urbanek