Skip to main content

Documentation Index

Fetch the complete documentation index at: https://upstash-vector.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Arguments

key
string
required
The key to set the timeout on.
unix
integer
A unix timestamp in seconds at which point the key will expire.

Response

1 if the timeout was set, 0 otherwise
await redis.set("mykey", "Hello");
const tenSecondsFromNow = Math.floor(Date.now() / 1000) + 10;
await redis.expireat("mykey", tenSecondsFromNow);