0

How can I tell if memcache was flushed programatically?

If I issues a echo flush_all | netcat localhost 11211 to memcache how can I tell it actually worked? I am writing some code to flush all servers and want to make sure they all received the command.

  • Mostly asking this because I didn't see any results in Google and I know I will come across this again in a year or so. – Elijah Lynn Jul 28 '16 at 17:27
1

So far it seems as one way to do it is to echo stats | netcat localhost 11211 and look at STAT cmd_flush and see if the number has incremented.

`echo stats | netcat localhost 11211 | sed --silent '/cmd_flush/p'

I can then compare this and see if it changed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.