I’m debugging the caching layer of a PHP application. It uses a cluster of memcache servers to cache values. I want to verify that a specific object gets purged correctly.
My idea was to connect to the right memcache server with telnet and check manually if the key exists.
I know the key that is passed to Memcache::set, but not which server to connect to. How do I know on which memcache server the data gets stored?
I just referenced the docs. Memcached clients hash the key to determine which sever to query. So, I guess Memcached IS sharded. You will probably have to look at the source of a client (or maybe the docs) to see how the hashing->sever is done. Otherwise you could just use a client from command line to query for the value.