• Resolved WPWanderer

    (@wpwanderer)


    What are the best practices for cache clearing.

    Should I clear the cache everytime I update a plugin (plugins are updating all the time)? Or will autooptimize do this automatically.

    Should I clear the cache each time I push a css style change? Or will autooptimze do this automatically if the is a version number on the style file?

    Should I clear the cache if I make a change to a template file?

    Anyways, wondering if I should always basically clear the cache. I see some posts saying that their cache is huge, and I am wondering how this.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Frank Goossens

    (@futtta)

    so …
    * ao never cleans cache automatically
    * clearing cache is only really needed if the size becomes too big (which can be an indication of more important problems)
    * cache size issues useally are due to “rogue” inline JS that busts the cache. not aggregating inline JS is the easiest fix 🙂

    UPDATE: there’s some great (well, I like to think so) info in the FAQ on this topic as well.

    hope this clarifies,
    frank

    • This reply was modified 9 years, 7 months ago by Frank Goossens. Reason: added FAQ-link
    Thread Starter WPWanderer

    (@wpwanderer)

    Thanks for the response.

    We are on wpengine, so whenever we push a css change we always have to clear the cache as sometimes our changes don’t show through.

    So, would you say when we do this we should clear your cache? Maybe I am just confused about how your cacheing works but I thought your plugin creates a cached file of the combined css. So, if we made changes to the CSS we should clear the cache to update the file being pulled. No?

    Thanks, again.

    Plugin Author Frank Goossens

    (@futtta)

    So, if we made changes to the CSS we should clear the cache to update the file being pulled. No?

    no, because AO uses the string of combined (but unminified) CSS as basis for the filename (using an md5-hash). so if only one letter in the code changes, the optimized CSS (or JS) is stored in a different file 🙂

    Thread Starter WPWanderer

    (@wpwanderer)

    Ah, that is great! That explains a lot. This would be the same for minified HTML as well, correct?

    Plugin Author Frank Goossens

    (@futtta)

    no, as the minified HTML isn’t cached by AO, but by your caching plugin (or in your case; WPE’s cache).

    Thread Starter WPWanderer

    (@wpwanderer)

    Thanks. I marked as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Best practices for cache clearing…’ is closed to new replies.