Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure not to clear the tracker cache so often when invalidating in core:archive #17321

Merged
merged 8 commits into from Mar 12, 2021

Conversation

diosmosis
Copy link
Member

Description:

There can potentially be a lot of invalidating of the tracker cache since we call ArchiveInvalidator functions one after the other. This PR introduces a utility function that collects all tracker cache clears and calls them just once after a callback finishes executing.

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@diosmosis diosmosis added the Needs Review PRs that need a code review label Mar 9, 2021
@diosmosis diosmosis added this to the 4.3.0 milestone Mar 9, 2021
core/Tracker/Cache.php Outdated Show resolved Hide resolved
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if that new method would be worth to be mentioned in the developer changelog. Otherwise looks good

@tsteur
Copy link
Member

tsteur commented Mar 9, 2021

It's not public API so no need to mention it 👍

@tsteur
Copy link
Member

tsteur commented Mar 11, 2021

fyi @diosmosis 2 tests still failing but maybe they are not due to this PR? https://travis-ci.com/github/matomo-org/matomo/jobs/489891666#L806

@diosmosis diosmosis merged commit b669dfd into 4.x-dev Mar 12, 2021
@diosmosis diosmosis deleted the less-cache-clear-invalidation branch March 12, 2021 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants