HPEXPIRETIME

Syntax
HPEXPIRETIME key FIELDS numfields field [field ...]
Available since:
7.4.0
Time complexity:
O(N) where N is the number of arguments to the command
ACL categories:
@read, @hash, @fast,

HPEXPIRETIME has the same semantics as HEXPIRETIME, but returns the absolute Unix expiration timestamp in milliseconds since Unix epoch instead of seconds.

Examples

redis> HSET mykey field1 "hello" field2 "world"
(integer) 2
redis> HEXPIRE mykey 300 FIELDS 2 field1 field2
1) (integer) 1
2) (integer) 1
redis> HPEXPIRETIME mykey FIELDS 2 field1 field2
1) (integer) 1715705913659
2) (integer) 1715705913659

RESP2/RESP3 Reply

  • Array reply. For each field:
    • Integer reply: -2 if no such field exists in the provided hash key, or the provided key does not exist.
    • Integer reply: -1 if the field exists but has no associated expiration set.
    • Integer reply: the expiration (Unix timestamp) in milliseconds.

RATE THIS PAGE
Back to top ↑