TTL
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.
$ SET yugakey "Yugabyte"
"OK"
$ EXPIRE yugakey 10
(integer) 1
$ TTL yugakey
(integer) 10
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .