PERSIST

Removes a key's expiry.

Keys & expiration · Example verified

Syntax covered here

PERSIST key

TTL confirms the key no longer expires after PERSIST; this concerns whole-key expiry, not hash field expiry.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: default
> SET sample value EX 60
"OK"
# connection: default
> PERSIST sample
1
# connection: default
> TTL sample
-1