(continued from phosphorescence: Arguments of set command on memcached telnet (1))
3rd argument : expiration time
3rd argument(e.g.
0) is the expiration time. If you set zero to this argument, there is no expiration. If you set any positive numbers, value is deleted automatically after the seconds of expiration time.
set some_key 2 15 1
c
STORED
get some_key
VALUE some_key 2 1
c
END
After 15 seconds,
get some_key
END
4th argument : byte length
4th argument(e.g.
1) is the byte length of value.
set some_key 3 0 1
d
STORED
replace some_key 3 0 1
HeCLIENT_ERROR bad data chunk
llo World
ERROR
replace some_key 3 0 11
Hello World
STORED
get some_key
VALUE some_key 3 11
Hello World
END
No comments:
Post a Comment