HPERSIST

Since 1.1.0Hashes

Syntax

HPERSIST key FIELDS numfields field [field ...]
  • Flags: write
  • ACL categories: @hash, @slow, @write
  • Arity: -5

Removes the expiry of fields of the hash at key.

Reply

An array with one element per field:

  • 1: the expiry was removed;
  • -1: the field had none;
  • -2: no such field, or no such key.

Examples

> HSET s token abc user ada
(integer) 2
> HEXPIRE s 100 FIELDS 2 token user
1) (integer) 1
2) (integer) 1
> HPERSIST s FIELDS 3 token user nope
1) (integer) 1
2) (integer) 1
3) (integer) -2