Synopsis
TTL key
Returns the remaining time to live of a key that has a timeout, in seconds.
Return value
Returns TTL in seconds, encoded as integer response.
Examples
You can do this as shown below.
"OK"
(integer) 1
(integer) 10
See also
set
, expire
, expireat
, pttl