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

Clearing W3TC page cache results in AO's cache being emptied #255

Closed
willstocks-tech opened this issue May 21, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@willstocks-tech
Copy link

commented May 21, 2019

Hey Frank,

I didn't notice this happening prior to 2.4.1 (I'm 99% sure anyways), but as of this morning, if I clear W3TC's page cache - AO's cache also gets cleared!

I wouldn't expect this behaviour normally. I'd expect AO's cache to build up regardless of W3TC's page cache state.

@futtta

This comment has been minimized.

Copy link
Owner

commented May 21, 2019

Hey Will;
It indeed does, got introduced in 2.4.0 actually, you can disable that with this code snippet;

add_filter('autoptimize_filter_main_hookpagecachepurge','__return_false');

Reason is simple; cache size issues are (were) the biggest issue when doing support, clearing AO's cache when the page cache is cleared is the safest moment to keep AO's cache under control for those who are not able to correctly configure AO ;-)

@futtta futtta closed this May 21, 2019

@willstocks-tech

This comment has been minimized.

Copy link
Author

commented May 21, 2019

Thanks Frank - just added that to my functions.php and my AO cache still cleared when clearing W3TC's page cache 😞

Using this option if it makes a difference:
image

Only reason I'd personally prefer this disabled is:

  1. I notice some weird behaviour when I clear AO and my page cache at the same time. It might be because I'm using CCSS, but on initial page load, I see flashes of weird styling. Everything then gets into the correct order once AO's cache has been built and I clear the page cache at that point... might just be something weird going on though!
  2. My AO cache doesn't infinitely grow... I have that thing on lockdown! 🤣
@futtta

This comment has been minimized.

Copy link
Owner

commented May 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.