HEXPIRETIME key FIELDS numfields field [field ...]
@read
,
@hash
,
@fast
,
Returns the absolute Unix timestamp in seconds since Unix epoch at which the given key's field(s) will expire.
See also the HPEXPIRETIME
command, which returns the same information with millisecond resolution.
redis> HSET mykey field1 "hello" field2 "world"
(integer) 2
redis> HEXPIRE mykey 300 FIELDS 2 field1 field2
1) (integer) 1
2) (integer) 1
redis> HEXPIRETIME mykey FIELDS 2 field1 field2
1) (integer) 1715705914
2) (integer) 1715705914
-2
if no such field exists in the provided hash key, or the provided key does not exist.-1
if the field exists but has no associated expiration set.