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
Disable auto cache purging when WP_IMPORTING is defined #4226
Comments
Scope a solution ✅I'm tempted to go further and bail-out from WP Rocket loading if We can add the constant check in Estimate the effort ✅Effort |
Hola, a question, what is the specific thought about labeling this low? Every site that is running a proper import via WP-CLI or even via WP All Import or so, wíth WP Rocket enable will profit from this. I just came back to this ticket, because I have another project which is running a big import which just crashes because WP Rocket clears cache on every single term, post etc creation / update. In this case the import is done via WP All Import. Regards, Jaime |
Maybe this following method is a better solution, add a filter to disable the clearing of the cache. So default is true, but through the filter it can be disabled. This way the person who is doing the import needs to disable WP Rocket knowingly and will start the generation of the cache after a import is finished. Example from SearchWP but FacetWP and ElasticPress have a similiar filter.
Most of my bigger projects run SearchWP and FacetWP and a import, so it puts quit some stress on the server that on every post and/or creation and/or update it reindexes the SearchWP, FacetWP && clears the WP Rocket cache. Hope the filter is a implementation where you can stand behind. Kinds regards, Jaime |
Is your feature request related to a problem? Please describe.
When running a custom import via cronjob on a production site with WP Rocket enabled, the cache clearing (
rocket_clean_domain
) make the import mega slow.Describe the solution you'd like
Instead of remove all actions like here, https://github.com/wp-media/wp-rocket-helpers/blob/master/cache/wp-rocket-no-cache-auto-purge/wp-rocket-no-cache-auto-purge.php, just don't add the actions when
WP_IMPORTING
is defined.Describe alternatives you've considered
Add
--skip-plugin=wp-rocket
with our custom WP-CLI command.The text was updated successfully, but these errors were encountered: