refactor memcache client