redis.expire {rediscc}R Documentation

Set key lifetime

Description

redis.expire set lifetime of key to expire in seconds

Usage

redis.expire(rc, key, seconds)

Arguments

rc

Redis connection as returned by redis.connect

key

key associated with the counter

seconds

Number of seconds after which the key should expire

Details

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.

Value

integer, resulting 1 success 0 failure

Author(s)

Simon Urbanek


[Package rediscc version 0.1-6 Index]