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

WP Rocket clears whole cache when ACF option page is updated despite the plugin "WP Rocket | Disable Cache Clearing" is active #64

Open
przestrzal opened this issue Dec 8, 2022 · 3 comments

Comments

@przestrzal
Copy link

Hi,

everything is described in the title.

Is this bug or oversight?

I use "WP Rocket | Disable Cache Clearing" and i thought that nothing can't clear cache except manual trigger by button or custom function.

@przestrzal
Copy link
Author

Ok,

i've fount it in

/inc/3rd-party/plugins/advanced-custom-fields.php

function rocket_clear_cache_on_acf_options_save( $post_id ) {
	if ( 'options' === $post_id ) {
		rocket_clean_domain();
	}
}
add_action( 'acf/save_post', 'rocket_clear_cache_on_acf_options_save' );

Could you adjust in to obey the "WP Rocket | Disable Cache Clearing" ?

@piotrbak piotrbak transferred this issue from wp-media/wp-rocket Dec 21, 2022
@piotrbak
Copy link
Contributor

Hello @przestrzal and thanks for creating the issue. I moved it to the correct repository.

Could you share with us exact steps to reproduce when the cache is cleared? Do you need premium version of the ACF plugin?

@Mil1
Copy link

Mil1 commented Feb 13, 2024

Hello, i found this solution is not perfect but is working fine !

add_action( 'acf/save_post', function () { define( 'WP_IMPORTING', true ); }, PHP_INT_MIN );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants