PEXPIRE
Sets a key's remaining lifetime in milliseconds.
Keys & expiration · Example verified
Syntax covered here
PEXPIRE key millisecondsThe case checks that PTTL falls within the requested duration after expiry is set.
Tested example & replies
Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.
# connection: default
> SET sample value
"OK"
# connection: default
> PEXPIRE sample 60000
1
# connection: default
> PTTL sample
60000