Support » Plugin: Autoptimize » What is considered a “huge” cache…

  • Resolved WPWanderer


    Hi, what would be considered a “huge” cache? Things seem to be working well, but the cache is at the 450MB just after being active for a couple days. Wondering if I should worry or that it might stabilize. And what is huge? I do understand that a warning message is displayed a 500MB.

    I do have aggregate inline JS activated as something critical was breaking without it on, so if my cache goes to crazy I may need to figure out how to make things work without it on. Possibly, I should turnoff aggregate css, as I know some of the plugins are putting css in the header. Would this cause a rise in the cache?


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


    450MB in a couple of days is too much really. in 99% of the cases this indeed is due to inline JS (and not CSS), so you will indeed have to dig in there I’m afraid 🙂

    Indeed. I just downloaded the cache from the server and CSS was only 24Mbs.

    From looking at the cache is there any way to discern the effects of aggregating JS?

    I wonder if submitting to Google would effect this. We have also been hitting the site pretty hard with testing tools.

    Plugin Author Frank Goossens


    From looking at the cache is there any way to discern the effects of aggregating JS?

    well, you could compare the autoptimized JS-file of 2 similar pages and see what is different?

    I wonder if submitting to Google would effect this. We have also been hitting the site pretty hard with testing tools.

    if the inline JS would change with every new visitor, then indeed your testing tools (and google) would impact your cache size as well.

    Just so I understand how the cacheing works. Every page will create it’s own cache file, yes?

    For one part of my site i’m in the black hole of reference errors and load ordering with aggregated js turned off.

    I think I may just work on trying to make aggregated JS leaner if possible.

    Hi. So, I decided to watch how the cache files are created on my local development install.

    I noticed that it creates a cache file for each page which I expect.

    However, what is odd that for the “Home” Page it creates a cached file and then every time I refresh that page or go back to that page it creates another cached file. Is this expected or is something definitely wrong here?

    Sorry, I figured this out. I read your blog post. There was a plugin that was creating some dynamic variables in JS at the bottom. I think this was a big culprit of why my JS was getting so big with aggregate JS on.

    Last question and I think I got this cache thing under control.

    If I make changes to a JS/CSS file will the new cache file completely replace the old one or create a duplicate? Thanks.

    Plugin Author Frank Goossens


    a quick summary of how AO works should clarify (will focus on JS, but it works almost identically for CSS);

    1. AO interecepts the HTML created by WordPress for a request
    2. all references to JS are extracted from the HTML
    3. all references to extracted JS are removed from the HTML
    4. all JS is aggregated
    5. the md5-hash (mathematical stuff that generates a semi-unique string based on another string) or the aggregated JS calculated
    6. using the md5 AO checks if a cached file with that md5 exists and if so continues to step 8
    7. no cached file, so the JS is minified and cached in a new file, with the md5 as part of the filename
    8. the links to the autoptimized JS file in cache are injected in the HTML
    9. the HTML is returned to WordPress (where it will be cached by a page cache and sent to the visitor

    so ideally you don’t have a JS per page, but many pages reusing the same ao-file, allowing your visitors to reuse the same JS in browser cache.


    Thanks Frank. That explains a ton. Sorry if I missed it somewhere in you docs.

    Your blog article here: “How to keep Autoptimize’s cache size under control”

    Was also key to me understanding why the cache was getting so huge as a new cache file was being created because of this changing variable.

    Thanks, again.

    Hi Frank
    I have install this plugin to my website but this is not work. As my website is in bilingual language English and Hindi and for bilingual we used Polylang Plugin. Is this plugin does’t work for bilingual site? When we enable below mention option its through error (Error 503 Service Unavailable)
    HTML Options
    JavaScript Options
    CSS Options

    Plugin Author Frank Goossens


    Hi again Laksh;
    As I wrote in a mail 10 minutes ago;

    have a look at the FAQ ( and specifically the troubleshooting tips + try switching to the “legacy minifiers” Laksh.

    If you can’t get it to work, tell me what troubleshooting from the FAQ you tried and based on that we can decide next steps.

    hope this helps,

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘What is considered a “huge” cache…’ is closed to new replies.