Commands
>
EXPIRE

EXPIRE

Syntax

EXPIRE key seconds

Description

Set or reset a time to live, as seconds, on an entry.

Example

> EXPIRE name 10
> SET name "Tom"
> EXPIRE name 10
# After 10 seconds have elapsed ...
> GET name

Related Commands