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.
The key to expire.
The unix timestamp in milliseconds at which the key will expire.
1 if the timeout was applied, 0 if key does not exist.
1
0
key
Was this page helpful?