Clear Memcache Contents

Flush the Contents of Memcache From the Command Line

You can clear the cached contents of a memcached server by giving it a "flush_all" command. You can do this with netcat (nc) or telnet.

Clear Memcache with Netcat

echo "flush_all" | nc cache01.example.centoshowtos.org 11211

Clear Memcache with Telnet

You can also telnet to the server, and issue a "flush_all" followed by "quit". It looks like this.

[user@host ~]$ telnet cache01.example.centoshowtos.org 11211

Connected to localhost.
Escape character is '^]'.
flush_all
OK
quit
Connection closed by foreign host.
(Comments)

Comments