Some debugging code

Andy memcached at
Tue Oct 31 21:35:31 UTC 2006

On Tue, 2006-10-31 at 11:54 -0500, Randy Wigginton wrote:
> So, if you need to see what your server knows about, you can add this
> code into the main command handler in memcached.c, and then you will
> be able to send the "keys" command to get a listing of all keys in
> that server.

I know this might be opening a can of worms, but would anyone be against
adding this code to the trunk branch but only enabled with some stupidly
obvious command line option like
--debugging-mode-do-not-enable-for-production-environment or maybe
--enable-high-latency-commands?  Or maybe this option could also make
memcached run slower to encourage people not to use it?  Or if enabled,
memcached will only store a limited number of keys or only process a
certain number of commands before dying?  I can definitely see the use
of this (I myself was using 'stats items' and 'stats cachedump' to
examine the cache while doing some development/testing/debugging over
the weekend, which was hard going because they are kind of difficult to

On the other hand, client support for writing to flat files but using
the same API might be better.  Then during debugging, you can change
your client code to use the more easily debuggable storage backend.

Andy <memcached at>

More information about the memcached mailing list