rewrite cacheserver design