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.

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

  1. 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. 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.

    • 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 :-/

      • 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?

        • 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.

  3. Hey guys. Don’t think Divi has addressed issue yet. They recently published a blog post (December 27, 2018) about minifying CSS and featured Autoptimize. I commented on this issue within the blog post comments. Normally, they’re pretty good about replying but not so much in this post – no reply to my comment yet. I thought the community might jump in as well, but no activity.

  4. Funny they are so silent (and sensitive?) on this … they are usually pretty quick. Especially given the amount of users Autoptimize has, it makes sense to try to play well. I am still a Divi user but this has put me off somewhat!

  5. Hi! Yes just asked them in their support chat, sent them link and asked if they will fix quick.
    They replied “Sorry for the trouble. This is already added on our tracker.”
    Not much clarity there I am afraid ๐Ÿ™

  6. I’ve just flagged this with Divi support again – no updated sadly.
    Support said “The bug report is still open, I left a comment about this chat so our dev team knows it’s more requested”
    The more people that flag this with them the quicker it will be fixed I’m sure.

  7. For those still on Divi: does this still happen? I might add some nifty code to stop them from acting so silly, but would I need someone (or some two) people who can provide info & test? ๐Ÿ™‚


Leave a Comment

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