How to flush the contents of a Memcached instance

Here is a convenient way to flush the entire contents of your Memcached instance using telnet.

$ telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
flush_all
OK
quit
Connection to localhost closed by foreign host.
$

Once you are connected to the appropriate memcached host and port (using telnet), use the flush_all command (which should return an OK response) followed the quit command to flush the current cache contents.