-
Notifications
You must be signed in to change notification settings - Fork 227
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
Don't cache not valid taxonomy frontend pages and stop applying optimizations #6984
Don't cache not valid taxonomy frontend pages and stop applying optimizations #6984
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
@wordpressfan I think the changes look good to fix the issue at hand, are you waiting for something before moving it forward to review? |
This PR was a POC to validate the idea, so it needs to be adapted to be a real PR, like fixing phpcs and tests. |
I'm working on tests now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @wordpressfan. Everything looks good, exploratory and otherwise.
Related Tests Results Report below:
testrail-report-650.pdf
Description
Fixes https://github.com/wp-media/wp-rocket.me/issues/4164
In this pull request, we are checking if the current frontend page is a taxonomy page and it has a not valid url schema, then we disable this page's caching, also stop applying all optimizations there.
Type of change
Detailed scenario
As mentioned in the issue itself:
Technical description
Documentation
Here we get all public taxonomies that have UI pages and compare the current page's query var with the taxonomies query vars.
We provided also a filter
rocket_cache_taxonomy_query_vars
so we can include or exclude taxonomy query vars from that functionality.New dependencies
No
Risks
The only thing that I can think of, is that we will prevent those pages from being cached as they were already cached but that's to fix the mentioned issue.
Also for @wp-media/qa-team,
In this PR, we also added a change to check if the
rocket_buffer
filter returns empty HTML, then we will revert back to the main page's HTML, so if you used the following snippet as an example:Before this PR, the page will be blank, but with this PR, we will show the not optimized page.
Mandatory Checklist
Code validation
Code style
Additional Checks