quick way to clear memcache

useful to clear memcache when debugging especially when we have applications running on it.

In php,


$memcache_obj = new Memcache;
$memcache_obj->connect('localhost', 11211);
$memcache_obj->flush();

In unix,

echo “flush_all” | /bin/netcat -q 2 127.0.0.1 11211

Like it.? Share it:

Comments are closed.