[server][CacheServiceDBClient] Clean up by extracting the commonly available lines.