PTTL
Since 1.1.0Keys
Syntax
PTTL keyReturns how long key has before it expires, in milliseconds.
Reply
- The milliseconds left.
-1if the key has no expiry.-2if the key does not exist.
Examples
> PSETEX p 1500 v
OK
> PTTL p
(integer) 1500
Since 1.1.0Keys
PTTL keyReturns how long key has before it expires, in milliseconds.
-1 if the key has no expiry.-2 if the key does not exist.> PSETEX p 1500 v
OK
> PTTL p
(integer) 1500