cleanup cache metadata when caching fails