Trying to 'dump' all data in memcache to disk
smagister at gmail.com
Tue Apr 24 01:17:49 UTC 2007
I'm running memcached v1.2.1 with the python API v 1.34. I'm keeping
a rather large number of key/object pairs in memcache (about 2
million) which take up about 2GB of space in RAM. It takes a long
time to load all the objects from a database. To expedite this, I
would like to load it once for the database and then transfer what's
in RAM to disk so I can load back into memcache in case of a crash.
So basically I'm looking for a way to dump the entire memcache to a
file and then load it back up again.
I found somthing to that effect here, but it seems like it actually
can't be done presently.
If anyone can tell me for sure it can't be done, that would be useful
so I can stop looking.
What I'm considering doing is grabbing all the objects key by key,
then appending them to a list in python, pickling that list and then
saving it to disk. Loading them would work the other way around.
But if it's possible to do this without python that would be very
Thanks in advance,
More information about the memcached