Sets a timeout on key. The key will automatically be deleted.
await redis.set("mykey", "Hello"); await redis.expire("mykey", 10);
The key to set the timeout on.
How many seconds until the key should be deleted.
1 if the timeout was set, 0 otherwise
1
0
Was this page helpful?