memcached relation, refactoring