Skip to main content

HTTL

Note

Official reference: HTTL.

Read remaining field lifetimes in seconds.

Syntax

HTTL 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 no expiration; -2 means the field does not exist.

Results

ReturnRowsContent
ResultSetmultipleRESULT field, LONG type

Example

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