PERSIST

Since 1.1.0Keys

Syntax

PERSIST key
  • Flags: fast, write
  • ACL categories: @fast, @generic, @keyspace, @write
  • Arity: 2

Removes the expiry of key, so that it is kept until deleted.

Reply

  • 1 if an expiry was removed.
  • 0 if the key had none, or does not exist.

Examples

> SET a 1 EX 100
OK
> PERSIST a
(integer) 1
> PERSIST a
(integer) 0