memecahe に telnet でつなげるのに飽き飽きしたので、memcache-cli 入れた
memcache に telnet localhost 11211 するのに飽きました
このブログにはお世話になりました
http://blog.kimuradb.com/?eid=656138
でも、無理です。
set yamashiro 0 0 9
とかミスらないで打つの無理です
いつも軽いラッパー書こうかなーとか思いつつ、
cliのツール書くのとか結構だるいとサボってました。
どうせ誰か作ってんだろうと思ってググったらありました。
memcache-cli
https://github.com/andrewgross/memcache-cli
入れました
$brew install python $echo "export PATH=/usr/local/share/python/:$PATH" >> ~/.zshrc $source ~/.zshrc $easy_install pip ... pip 1.2.1 is already the active version in easy-install.pth ... # pip さん brew が入れてくれてました $pip install memcache-cli $source ~/.zshrc
はい。これでmemcache-cliが使えるように。
$memcache-cli localhost:11211 Connecting to localhost:11211 │ (memcache)
でつなげます。helpもあるので
(memcache) help Documented commands (type help <topic>): ======================================== add decr forget_dead_hosts gets reset_cas append delete get incr set cas delete_multi get_multi prepend set_multi check_key flush_all get_stats replace set_servers Undocumented commands: ====================== EOF debuglog disconnect_all exit get_hit_rate get_slabs help (memcache)
あとは、
(memcache) set hoge foo True (memcache) get hoge 'foo' (memcache)
こんな感じで使えます
結論
Redis使おう