-
Notifications
You must be signed in to change notification settings - Fork 226
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
Preload: Don't try to preload private pages #5885
Comments
To reproduce:
Additional context Acceptance Criteria:
|
Just to add, it happens once per each time that preloading is triggered. i.e so we'll also try again when the page is updated. |
Reproduce the problem ✅I was able to reproduce the problem. Identify the root cause ✅We are not checking post status before adding urls to be preloaded in the cache table. Scope a solution ✅We can create a new method in https://github.com/wp-media/wp-rocket/blob/fbfdfed79ca924284394fa53f84bec7b61413587/inc/Engine/Preload/Controller/ClearCache.php
Then use new method in
Update tests too. Estimate the effort ✅[S] |
Co-authored-by: Vasilis Manthos <[email protected]>
Is your feature request related to a problem? Please describe.
WP Rocket will try to preload pages that have been set to Private in WordPress. This generates unnecessary requests and results in 404 errors. If there are a lot of them, it would also slow down the whole process.
Describe the solution you'd like
We could check if a page is private, and if so, automatically exclude it from Preload.
Describe alternatives you've considered
Customers could manually exclude these URLs, but that's not ideal from a UX point of view.
Additional context
Related ticket: https://secure.helpscout.net/conversation/2219018645/415412?folderId=377611
The text was updated successfully, but these errors were encountered: