1. check the memcache status/usr/bin/perl/usr/local/memcached/scripts/memcached-toollocalhost: 11211 or telnetlocalhost112112. manually clear memcached test 1). flush_allecho &
1. check the memcache status
/usr/bin/perl /usr/local/memcached/scripts/memcached-tool localhost:11211
Or
telnet localhost 11211
2. manually clear memcached test
1). flush_all
echo "flush_all" | nc localhost 11211# telnet localhost 11211Trying 127.0.0.1...Connected to localhost.localdomain (127.0.0.1).Escape character is '^]'.get var_keyVALUE var_key 0 13test variableENDflush_allOKget var_keyENDquitConnection closed by foreign host.
2) restart the memcached process.
kill $(ps aux|grep memcached|grep -v grep |awk '{print $2}')/usr/local/memcached/bin/memcached -d -m 256 -p 11211 -u nobody
3) Memcache: flush ()? Clear all caches immediately.
connect('memcache_host',?11211);$memcache_obj->flush();?>
In this test, the value of get $ key can still be obtained after Memcache: flush () is requested, and the max_age of the item is not changed through memcached-tool.