Arguments
string
required
The key to expire.
integer
The unix timestamp in milliseconds at which the key will expire.
Response
1 if the timeout was applied, 0 if key does not exist.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
const 10MinutesFromNow = Date.now() + 10 * 60 * 1000;
await redis.pexpireat(key, 10MinutesFromNow);
Sets a timeout on key. After the timeout has expired, the key will automatically be deleted.
1 if the timeout was applied, 0 if key does not exist.const 10MinutesFromNow = Date.now() + 10 * 60 * 1000;
await redis.pexpireat(key, 10MinutesFromNow);
Was this page helpful?