AttentionThis page documents an earlier version. Go to the latest (v2.3) version.
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