Unify interface of cache-server and Refactor