pluginkollektiv / cachify

Smart but efficient cache solution for WordPress. Use DB, HDD, APC or Memcached for storing your blog pages. Make WordPress faster!
https://wordpress.org/plugins/cachify/
GNU General Public License v2.0
99 stars 32 forks source link

Site broken after every Elementor update; Add flush cache after update option #272

Open ghost opened 2 years ago

ghost commented 2 years ago

Describe the bug Website's styling is broken after every auto-update of Elementor or Elementor pro (and likely other page builder plugins) because the cache doesn't flush upon plugin updates.

To Reproduce Steps to reproduce the behavior: 1: Install Elementor, create a page with it 2: Set Elementor to auto-update 3: Wait for it to auto-update 4: Visit the page (with Cachify enabled, obviously) 5: See broken page

Expected behavior It should flush the cache after every plugin update because it is very likely scripts and styles are getting updated.

System (please complete the following information): Any

Additional context Perhaps adding an option to flush the cache after plugin/theme/core updates would be prudent to resolve the issue.

Zodiac1978 commented 2 years ago

You can use the cachify_flush_cache_hooks Filter to add this. We decided against it, because not every plugin needs this. Maybe we need to revise this decision...

ghost commented 2 years ago

Alright, giving that a go on "upgrader_process_complete". Thanks for that and yes, I definitely think it should flush on updates. It's not hurting anyone but it may break many websites so the needs outweigh the cost by far imho.

Zodiac1978 commented 2 years ago

WP Rocket displays a warning with an info about the detected plugin update. Maybe this could be a first step.

ghost commented 2 years ago

That would require me to be on the dashboard to see that warning. Having it on auto-update (which I usually don't but many people do) leaves me unaware of a broken site. Having to log in to clear the cache manually every time defeats the purpose of auto-upating altogether.