Upstash Documentation

PEXPIREAT

Sets a timeout on key. After the timeout has expired, the key will automatically be deleted.
1 min read

Arguments#

keystrrequired#

The key to expire.

unix_time_millisecondsint | datetime.datetimerequired#

The timeout in unix milliseconds 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#