Upstash Documentation

HEXPIREAT

Sets an expiration time for field(s) in a hash in seconds since the Unix epoch.
1 min read

Arguments#

keystrrequired#

The key of the hash.

fieldsUnion[str, List[str]]required#

The field or list of fields to set an expiration time for.

timestampintrequired#

The expiration time as a Unix timestamp in seconds.

nxbool#

Set expiry only when the field has no expiry. Defaults to False.

xxbool#

Set expiry only when the field has an existing expiry. Defaults to False.

gtbool#

Set expiry only when the new expiry is greater than the current one. Defaults to False.

ltbool#

Set expiry only when the new expiry is less than the current one. Defaults to False.

Response#