What's new in Valkey 9.0? Discover new features and improvements. Read the announcement.
HEXPIRETIME
Returns Unix timestamps in seconds since the epoch at which the given key's field(s) will expire.
Usage
HEXPIRETIME key FIELDS fields
Complexity
O(N) where N is the number of specified fields.
Since
9.0.0
ACL Categories
@fast, @hash, @read
Command flags
READONLY, FAST
The HEXPIRETIME command returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given hash field(s) will expire or -1 if the hash field doesn't have expiration time.
See also the HPEXPIRETIME command that returns the same information with milliseconds resolution.
Array reply: a list of values associated with the result of getting the absolute expiry timestamp of the specific fields, in the same order as they are requested.
-2: Field does not exist in the provided hash key, or the hash key is empty.
-1: Field exists in the provided hash key, but has no expiration associated with it.
Integer: The expiration time associated with the hash key field, in seconds.
RESP3
Array reply: a list of values associated with the result of getting the absolute expiry timestamp of the specific fields, in the same order as they are requested.
-2: Field does not exist in the provided hash key, or the hash key is empty.
-1: Field exists in the provided hash key, but has no expiration associated with it.
Integer: The expiration time associated with the hash key field, in seconds.