lammert - 8:41 am on Apr 30, 2010 (gmt 0)
Looks like an interesting idea. I see some problems though in a practical situation.
Memcache has no dump feature to move all its contents directly to a file and also no index feature to list the keys of all the stored data items. You need to program that by hand. To do that you have to know the naming of the data items to retrieve them. And as memcache is a self-cleaning cache which removes stale items, you may have to request much more keys than are actually available.
Another problem I can see is execution time. Even though memcache is designed to be fast, pumping 2GB of data into a file and back into memory may be a time consuming operation. Ideally these actions should be performed asynchronously where the memcache buffer is stored and filled slowly while your application is running. Otherwise a simple reboot may cause a long delay until your application is back up and running again.