diff --git a/HowtoMemcached.md b/HowtoMemcached.md index a14e33a8..948e289e 100644 --- a/HowtoMemcached.md +++ b/HowtoMemcached.md @@ -58,22 +58,35 @@ $myValue = $memcache->get('my_value'); ?> ~~~ -## Test en telnet +## Test avec telnet ~~~ $ telnet localhost 11211 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. + +set foo 0 100 3 +bar +STORED + get foo -VALUE foo 0 2 -hi +VALUE bar 0 3 END + stats STAT pid 8861 (etc) ~~~ +## Test avec netcat + +En non-interactif, utile pour mettre dans un script : + +~~~ +echo -e "set check_memcached 0 100 5\r\ncheck\r\nquit" | nc localhost 11211 +echo -e "get check_memcached\r\nquit" | nc localhost 11211 +~~~ ## Administration