PSETEX

Synopsis

PSETEX key ttl_in_msec string_value

This command sets the value of key to be string_value, and sets the key to expire in ttl_in_msec milli-seconds.

Return Value

Returns status string.

Examples

$ PSETEX yugakey 1000 "Yugabyte"
"OK"
$ GET yugakey
"Yugabyte"
$ PTTL yugakey
(integer) 900

See also

append, set, setex, get, getrange, getset, incr, incrby, setrange, strlen