kevy4.0

EXPIRE

Set a key's TTL in seconds (non-positive TTL deletes the key).

EXPIRE key seconds
Group
Generic
Since
1.0.0
Arity
exactly 3
Flags
write

Complexity

O(1)

Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.

Redis compatibility

Differs

the NX / XX / GT / LT condition flags are not parsed — arity is fixed at 3, so EXPIRE key seconds NX is a wrong-arity error

See also

DELEXISTSEXPIREATPERSISTPEXPIREPEXPIREATPTTLRENAMERENAMENXTTLTYPEUNLINK

← All commands