[server][CacheServiceDBClient] Clean up with a helper function.