We use memcached a lot here. Occasionally we need to flush the entire cache, and would prefer not to do a restart.
The attached script does just that. To use it:
flushmemcached.sh [server [port]]
server defaults to localhost, and port defaults to 11211
You will be prompt to confirm. You must type YES in all capitol letters to confirm.
flushmemcached.sh (864 bytes, 2,440 hits)