SETEX
Synopsis
SETEX key ttl_in_sec string_value
This command sets the value of key
to be string_value
, and sets the key to expire in ttl_in_sec
seconds.
Return value
Returns status string.
Examples
$ SETEX yugakey 10 "Yugabyte"
"OK"
$ GET yugakey
"Yugabyte"
$ TTL yugakey
(integer) 10
See also
append
, set
, psetex
, get
, getrange
, getset
, incr
, incrby
, setrange
, strlen
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .