Generic
PEXPIRE
Sets a timeout on key. After the timeout has expired, the key will automatically be deleted.
Arguments
keybodystringrequired
The key to expire.
millisecondsbodyinteger
The number of milliseconds until the key expires.
Response
integerrequired
1 if the timeout was applied, 0 if key does not exist.
Example
await redis.pexpire(key, 60_000); // 1 minute