Upstash Documentation

EXPIREAT

Sets a timeout on key. The key will automatically be deleted.
1 min read

Arguments#

keystrrequired#

The key to set the timeout on.

unix_time_secondsint | datetime.datetimerequired#

The timeout in unix seconds timestamp as int or a datetime.datetime object.

nxbool#

Set expiry only when the key has no expiry

xxbool#

Set expiry only when the key has an existing expiry

gtbool#

Set expiry only when the new expiry is greater than current one

ltbool#

Set expiry only when the new expiry is less than current one

Response#