Skip to main content

HPERSIST

Note

Official reference: HPERSIST.

Remove field expiration.

Syntax

HPERSIST key FIELDS numfields field [field ...]

Requires Redis 7.4+. numfields must match the number of following fields. Each field produces a RESULT row in argument order.

1 means expiration removed; -1 means the field had no expiration; -2 means the field is missing.

Results

ReturnRowsContent
ResultSetmultipleRESULT field, LONG type

Example

HSET demo:user name mali
HEXPIRE demo:user 60 FIELDS 1 name
HPERSIST demo:user FIELDS 1 name