Remove cache clearing from forget invalidations loop. #18278
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
issue: d2405
There has been a lot of tracker general cache invalidation occurring seemingly needlessly. It seems to come down to the archive invalidation clearing out the cache when trying to forget (remove) the remembered dates that need to be reArchived. This appears to be an accidental regression based off the comment.
I've removed the cache clearing from inside
forgetRememberedArchivedReportsToInvalidate
method. Both uses of this method will clear the general cache just after this method anyway.I can't think of any cases that this should cause a problem. The only think I can think is that doing it perhaps only moments later (after the loop) might increase the probability of clearing out something that was just cached. Even if it was the case but picking a time between the two seems arbitrary. In that case it would be preferable to clear the cache before the loop.
Review