Support » Plugin: Autoptimize » How to increase the Max Cache Size

  • Resolved Mflexwala


    My cache size is limited to 600 Mb – 700 Mb.
    I have lots of disk space, so I want to increase the maximum cache size that can be stored.
    How can I do that.

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


    you can use a code snippet like this one;

    function adjust_cachesize() {
      return 3*512*1024;

    which would set the cache-size at 1.5GB.

    hope this helps,



    I added the filter in the function.php of my theme.
    After that the Autoptimize started showing the cache is full.



    Even I tried using the Code Snippet Plugin.
    Whenever I activate this snippet the Autoptimize Cache Info show full.
    Please Help!

    Plugin Author Frank Goossens


    my mistake;

    return 3*512*1024;

    is 1.5 MB, so you’ll have to multiply some more 🙂

    to be clear; AO never limits the cache-size, this number is only about when you’ll be warned!



    Thank You.
    It worked.



    What is used to send the warning email?

    I’ve changed the cache maxsize, but still receive the warning emails. (A desired feature – I just only want them when I’m being warned about the new maxsize.)


    Plugin Author Optimizing Matters


    that would be the ao_cachechecker_cronjob() in classlesses/autoptimizeCacheChecker.php. but that one also uses the same filter;

    $maxSize = (int) apply_filters( "autoptimize_filter_cachecheck_maxsize", 512000);

    so this should work, but if not you could change that number at the end of that line?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to increase the Max Cache Size’ is closed to new replies.