PERSIST

Since 1.1.0KeysChanged in 1.2.1

Syntax

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

History

  • 1.2.1: acl categories: removed generic

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