Hi!
I have added a new command called memcached_dump() to libmemcached. It
takes a memcached_st and a callback function as an argument. It will
loop through the servers and call the callback function on all of the
keys it finds.
Because memcached does not guarantee that it will provide all keys,
you cannot expect to get "all keys".
So why add it?
I am working on a driver for Gearman and I need to shove values into
gearman to be executed on. Now I can just push items into memcached
and Gearman will read from its list of memcached servers and grab keys.
Gearman grabs the value from memcached and deletes the key. The
Gearman worker just loops through the servers and constantly processes
values.
The end result? I get a non-durable but distributed queue. This is not
perfect but it solves my problem :)
I have also added a memdump command that will dump the key names from
a server. It should be possible to make it do an actual dump of the
server for some sort of partial backup but I haven't gotten to that yet.
Cheers,
-Brian