1. Check memcache status
/usr/bin/perl/usr/local/src/memcached-1.4.5/scripts/memcached-tool localhost:11211
Or
telnet localhost 11211
2. Manually clear the memcached test
1). Flush_all
echo "Flush_all" | NC localhost 11211
# telnet localhost 11211
Trying 127.0.0.1 ...
Connected to Localhost.localdomain (127.0.0.1).
Escape character is ' ^] '.
Get Var_key
VALUE Var_key 0 13
Test variable
END
Flush_all
Ok
Get Var_key
END
Quit
Connection closed by foreign host.
2). Restart the memcached process
Kill $ (PS aux|grep memcached|grep-v grep |awk ' {print $} ')
/usr/local/memcached/bin/memcached-d-M 256-p 11211-u Nobody
3)Memcache::flush () immediately invalidates all existing items.
/* Procedural API */
$memcache _obj=Memcache_connect(' Memcache_host ',11211);
Memcache_flush ( $memcache _obj /* oo api */
$memcache _obj = new memcache $memcache _obj-> connect memcache_ Host '
The performance of this test is that the request Memcache::flush () can still get the value after the fetch $key, and the max_age of the item is not changed by Memcached-tool.
Reference links
Microsoftinternetexplorer402documentnotspecified7.8normal0
Understanding Memcache Server-side vs. client
http://www.studyday.net/2011/07/261
To manually clear the Memcached cache method