Fix cache invalidation