Generic

PEXPIREAT

Sets a timeout on key. After the timeout has expired, the key will automatically be deleted.

Arguments

keybodystringrequired

The key to expire.

unixmillibodyinteger

The unix timestamp in milliseconds at which the key will expire.

Response

integerrequired

1 if the timeout was applied, 0 if key does not exist.

Example
const 10MinutesFromNow = Date.now() + 10 * 60 * 1000; await redis.pexpireat(key, 10MinutesFromNow);
Loading search…