HEXPIRETIME
Note
Official reference: HEXPIRETIME.
Read field expiration timestamps in seconds.
Syntax
HEXPIRETIME 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
| Return | Rows | Content |
|---|---|---|
| ResultSet | multiple | RESULT field, LONG type |
Example
HSET demo:user name mali
HEXPIRE demo:user 60 FIELDS 1 name
HEXPIRETIME demo:user FIELDS 1 name