1. 程式人生 > >shell指令操作memcached

shell指令操作memcached

stat cache val emca \n 初始 127.0.0.1 del shel

shell指令操作memcached,可以用來直接測試memcached.

初始值為1000

#set test-value =1000
printf "set test-value 0 0 4\r\n1000\r\n" | nc 127.0.0.1 11211

#get test-value
printf "get test-value\r\n" | nc 127.0.0.1 11211

#test-value +1
printf "incr test-value 1000\r\n" | nc 127.0.0.1 11211

#test-value-1
printf "decr test-value 1000\r\n" | nc 127.0.0.1 11211

#delete test-value
printf "delete test-value\r\n" | nc 127.0.0.1 11211

#view stats

printf "stats\r\n" | nc 127.0.0.1 11211

shell指令操作memcached