shell指令操作memcached
Posted ducklyl
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shell指令操作memcached相关的知识,希望对你有一定的参考价值。
shell指令操作memcached,可以用来直接测试memcached.
初始值为1000
#set test-value =1000
printf "set test-value 0 0 4
1000
" | nc 127.0.0.1 11211
#get test-value
printf "get test-value
" | nc 127.0.0.1 11211
#test-value +1
printf "incr test-value 1000
" | nc 127.0.0.1 11211
#test-value-1
printf "decr test-value 1000
" | nc 127.0.0.1 11211
#delete test-value
printf "delete test-value
" | nc 127.0.0.1 11211
#view stats
printf "stats " | nc 127.0.0.1 11211
以上是关于shell指令操作memcached的主要内容,如果未能解决你的问题,请参考以下文章