Autoptimize cache size: the canary in the coal mine

another-canary-in-a-coal-mineCopy/ pasted straight from a support question on wordpress.org;

Auto-deleting the cache would only solve one problem you’re having (disk space), but there are 2 other problems -which I consider more important- that auto-cleaning can never solve:
1. you will be generating new autoptimized JS very regularly, which slows your site down for users who happen to be the unlucky ones requesting that page
2. a visitor going from page X to page Y will very likely have to request a different autoptimized JS file for page Y instead of using the one from page X from cache, again slowing your site down
So I actually consider the cache-size warning like a canary in the coal mines; if the canary dies, you know there’s a bigger problem.
You don’t (or shouldn’t) really want me to take away the canary! 🙂

15 thoughts on “Autoptimize cache size: the canary in the coal mine”

  1. Thank You!!!
    Finally I think I understand more about the “caftty-cascheing” in AO.
    Your…. canary in the coal mine….allagory seems perfect to me!!
    Thanks so much…from a longtime user!

    Reply
  2. Hi,
    firt of all, thank you for providing autoptimize!
    I don’t mind that ther cache grows big – however, the blinking red circle annoys my editor-in-chief 🙂
    Is there any way to set the threshold where it starts to blink? e.g., 10 GB or whatever?
    Thank you,
    Hauke

    Reply
  3. Uh, that’s one great tip to use that code snippet thingie, thank you very much – works like a charme!
    By the way, in order to achieve a 10 GB cache size you would have to set 10 * 1024 * 1024 * 1024 – you are using bytes, not kilobytes :).
    I’m trying 1 GB, and for now that seems to be ok. In your opinion, is a cache size of ~750 MB too big? I know that it probably depends on roughly a milion factors – I’m just curious why it is as “big” as it is. So far it’s not really a problem, but I’m wondering: Is my canary about to die?
    Thanks again,
    /hauke

    Reply
    • well, 750MB does mean you’ve got a lot of different JS-files, which means that (assuming you have on average half a MB per JS-file) at least 1500 visitors had to wait for the JS-file to be created. I would try to find a way for more reuse of the cached files if I were you.

      Reply
  4. PS: This is what I just got from my “editor in chief” after I applied your “fix”:
    Jaaaaa, DANKE! ❤ :* :* (Yesssss, THANK YOU!)
    So, now you know it was worth the time (at least for me 😉

    Reply
  5. Is there a way to modify the email so that my client does not get it but I do ? I am an admin on the account but this is a fortune company and their IT is the default admin unless a plugin has an alternate way to pick the admin for the email.
    Thanks

    Reply
  6. Hi, do you have any tips to locating what is causing the cache size increase, do you have logs.
    It appears the CSS is generating every time I update refresh the site, which breaks other CDN’s I have in place.
    Any points of where to look would help alot.

    Reply

Leave a Comment

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