Warning: Divi purging Autoptimize’s cache!

A heads-up to Autoptimize users who are using Divi (and potentially other Elegant Theme’s themes); as discovered and documented by Chris, Divi purges Autoptimize’s cache every time a page/ post is published (or saved?).

To be clear; there is no reason for the AO cache being cleared at that point as:

  1. A new page/ post does not introduce new CSS/ JS
  2. Even if new CSS/ JS would be added somehow, AO would automatically pick up on that and create new optimized CSS/ JS.

Chris contacted Divi support to get this fixed, so this is in the ticketing queue, but if you’re using Divi and  encounter slower saving of posts/ pages or Autoptimized files mysteriously disappearing then his workaround can help you until ET fixes this.

8 thoughts on “Warning: Divi purging Autoptimize’s cache!

  1. Ylia @ Prank Flix Videos

    Hi Frank,

    I was watching a Google Adsense Video the other day, shortly after it was live streamed and you’ll be happy to know they recommended Autopimize as a professional choice used by many experts for minifyimg code. I run AO on all my sites and my latest https://prankflix.video is running on AWS clouding hosting with CDN like a dream thanks to AO and a few other nifty plugins.



  2. Shane McDonald

    Thanks for this, even with the Divi theme clearing the cache saving pages is not too bad. The only time it causes issue is if you are editing multiple pages and try saving 2 pages at the same time. Hopefully, Divi will be fixed soon.

    1. frank Post author

      well, in addition to dashboard slowness another potential issue is that this can result in (external) page cache’s having pages in cache that have links to long forgotten autoptimized CSS/ JS, severely breaking sites. this is exactly why AO does not have automatic cache purging, things can go south way to easily this way :-/

      1. Lilly Skye

        Thanks so much for keeping the community aware, Frank! Given your recent November 21 reply about potential other serious issues, will the fix Chris provided (commenting out with this line autoptimizeCache::clearall();) address these potential issues or is there greater concern about using the plugin at all right now with the Divi theme?

      2. frank Post author

        The fix Chris provided addresses those potential issues as well Lilly, but I hope Elegant Themes fixes this on their end asap but I’m getting no feedback at all. I would advise everyone who’s experiencing this to open a ticket at ET’s support portal.

    1. frank Post author

      don’t know, have not gotten any feedback from ET/ divi-crew. if you’re a Divi user you stand a better chance of getting through ;-)


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.