Refactor Redis, Memcache, Db