PTTL key

#Example

redis> SET mykey "Hello"
"OK"
redis> EXPIRE mykey 1
(integer) 1
redis> PTTL mykey
(integer) 1000

Get the time to live for a key in milliseconds

Comments