Autoptimize is causing thentire html cache to be cleared when a post is updated
-
Hi, over the past week we’ve noticed a strange problem.
When a page or a post or a category is updated, the entire HTML cache is flushed.
This is odd since our cache system WP Fastest cache is set to not clear the cache when posts or pages are changed.
We’ve troubleshooted for plugin conflicts.
When we disable Autoptimize the problem resolves.
We found this code snippet:
add_filter(‘autoptimize_filter_main_hookpagecachepurge’,’__return_false’);We added it to our child theme functions.php, but unfortunately, it did not resolve the problem.
We read the WP Fastest Cache web FAQ and checked the plugin logs which reveal this command being sent to clear the cache:
“26-05-2021 @ 14:01:32 flushPageCache”
when a post was updated. This occured when WP Fastest Cache and Autoptimize were both enabled.
However, when we disabled Autoptimize and tried updating a post, no “flushPageCache” command was sent or logged and the cache was not cleared.
Please could you let us know how to fix this? We run a static site, so we don’t want anything in the cache to be cleared unless we manually command it.
Many thanks for your help.
- The topic ‘Autoptimize is causing thentire html cache to be cleared when a post is updated’ is closed to new replies.