The Redis EXPIRE
command sets a timeout on a given key in seconds. After the timeout has expired, the key will be deleted.
Redis also has a PEXPIRE
command that works the same as EXPIRE
, except that it returns the timeout in milliseconds instead of seconds.
A key with a timeout is said to be volatile in Redis terminology.
Continue reading