memcached

How do I view the data in memcache?


I've installed memcache and now how do I really view the data in memcache?

Is there any way to see the data present in cache inside memcache?

How do I really know whether memcache is getting data stored inside it?

Note: I don't want to write any program to see the data inside memcache. Basically, memcache server is already installed in my environment and it is caching the data as well. But I would like to know if there are any utility programs available which will show me the cached data inside memcache or if there is any command which will show me the data cached so far.


Solution

  • There is no way to get memcached to report which keys it holds. I believe that this was a design choice as to do so would have a negative impact on performance.

    However, you can use any telnet client application to connect the memcached server and type in commands. Doing this to get or set a particular key.

    For example,

    stats
    

    or:

    get MY_KEY