• Resolved thegrbteam

    (@thegrbteam)


    Great plugin, thank you for your work on it.

    I had a question about cache size. I got an alert saying my cache size is getting big:

    2587 files, totalling 2351039 Kbytes – that seems huge and I’m not sure what it’s made up of as my website is about 50 pages. Is it saving css and js scripts uniquely for each page?

    I do have CSS in the HTML turned on (which adds to the issue I understand), this is a feature I want to keep though as I’m using visual composer that spills out loads of css in the source which isn’t pretty. In fact, after finding that issue, that’s how I discovered Autoptimize!

    I’m getting high server wait times so I’m thinking maybe my Autoptimize cache is responsible.

    Thanks, Dan

    https://www.ads-software.com/plugins/autoptimize/

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

    (@futtta)

    Hi Dan;
    first of all; check the amount of files in /wp-content/cache/autoptimize/css and /wp-content/cache/autoptimize/js to confirm if your problem is with amount of JS or amount of CSS-files.

    now the reason for this happening; AO cached each autoptimized file, but as soon as one character is different, that file cannot be used and a new one is created. that means that if you have inline JS or CSS that changes between requests or pages, then indeed you’ll have a huge amount of cache-files and this will hurt performance (not due to the amount of files on cache, but because of the fact that AO has to re-minimize over and over and because browsers won’t be able to use the same autoptimized CSS/JS file).

    the solution is either to not inline CSS or JS (easy) or to exclude the offending code from optimization (requires some peeking and poking around).

    hope this explains,
    frank

    Thread Starter thegrbteam

    (@thegrbteam)

    Thanks for the lighting fast response!

    So it’s pretty much all CSS. 2632 CSS files and 16 JS files. All created over the last 3 days.

    I’m not sure which CSS names would be changing with every page, I can’t think of any plugins that are changing css file name/path. I’ve just disabled AO to check some pages and can’t see anything changing from page to page.

    I have been making a few changing here and there over the last few days but I’m certain I cleared AO.

    I’ve downloaded some to look at. 90% of them are 939674 kb big with a few 910674 kb big and about 5 other different sizes. I compared them and found the difference to be custom css in the page for different visual composer elements. I also compared the ones of identical and the only difference I can find in them is the name of some classes that have been added and the odd line break:
    https://www.dropbox.com/s/takb3teyrrfhdtt/Screenshot%202016-01-15%2012.02.34.png?dl=0

    If I have 50 pages though, that should just be 50 css files if every page is unique in a worst case scenario?

    Thanks

    Thread Starter thegrbteam

    (@thegrbteam)

    I have been making a few changing here and there over the last few days but I’m certain I cleared AO.

    – ignore that, as I can’t of looking at the date created on the files

    Plugin Author Frank Goossens

    (@futtta)

    If I have 50 pages though, that should just be 50 css files if every page is unique in a worst case scenario?

    no, as it is entirely possible a plugin (visual composer or other) injects unique code that changes with time as well, so it could (as you are experiencing) be a lot worse.

    forgetting the way it looks for a minute, I would in your case absolutely advice against aggregating inline CSS. the performance-impact of AO having to create & the browser having to load a different CSS-file (even because of minor differences such as a selector-name changing) over and over outweighs any performance-impact keeping inline CSS in place might have, actually.

    frank

    Thread Starter thegrbteam

    (@thegrbteam)

    Understood. I really wish I had picked a theme that doesn’t use VC, for other reasons too, it’s more trouble than it’s worth.

    I will turn off aggregating inline CSS and re-visit after the weekend to check the size.

    Thanks for your help on this.

    Plugin Author Frank Goossens

    (@futtta)

    Thanks for your help on this.

    no problem, have a nice weekend!

    frank

    Thread Starter thegrbteam

    (@thegrbteam)

    Everything seems to be running smooth and making a normal amount of cached files now. It was visual composer making unique inline code for almost every vistor :/

    I do now have another issue though. AO doesn’t seem to want to work on my Blog post pages, it works on all pages and in custom posts fine though.

    How can I troubleshoot this?

    I have made a new thread for this to keep your support section tidy.

    https://www.ads-software.com/support/topic/ao-not-working-on-blog-posts-works-on-pagescustom-posts

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Huge cache size’ is closed to new replies.