Fix the cache invalidation