Refactor all code to go through memcached_do().