Arguments
string
required
The key to set the timeout on.
integer
How many seconds until the key should be deleted.
Response
1 if the timeout was set, 0 otherwiseDocumentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
await redis.set("mykey", "Hello");
await redis.expire("mykey", 10);
Sets a timeout on key. The key will automatically be deleted.
1 if the timeout was set, 0 otherwiseawait redis.set("mykey", "Hello");
await redis.expire("mykey", 10);
Was this page helpful?