NoteClick here to go to documentation for the latest version of YugaByte DB.
Similar to TTL this command returns the remaining time to live of a key that has a timeout set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.
Returns TTL in milliseconds, encoded as integer response.
$ SET yugakey "YugaByte"
$ EXPIRE yugakey 10
$ PTTL yugakey