redis/expire

Set Expiration

Set key timeout

expiration
management

Command

EXPIRE key seconds

Explanation

Sets a timeout on key. After the timeout has expired, the key will automatically be deleted.

Examples

Expire in 1 hour

EXPIRE session:1234 3600