AttentionThis page documents an earlier version. Go to the latest (v2.2)version.
EXPIRE key timeout
Set a timeout on key (in seconds). After the timeout has expired, the key will automatically be deleted.
Returns integer reply, specifically 1 if the timeout was set and 0 if key does not exist.
$ SET yugakey "Yugabyte"
$ EXPIRE yugakey 10
$ EXPIRE non-existent-key 10