Faq How can i reduce the amount of cache?
How can i reduce the amount of cache?

JSpeed optimizations are based on auto-generated cache files that include all assets for Javascript and CSS files. The plugin generates two cache files for each page, one is used for combined CSS files and another for combined Javascript files.
In certain cases you may experience a huge amount of cache files which can take up several GB of disk space, this could happen for example if you have a large amount of JS or CSS files or if they are dynamically generated. This could cause the JSpeed combined files to refresh more often and for each page request.
For example, if you have a script that changes continuosly, each page request by different users will generate a different and unique cache file, in this case it's required that you find and exclude it from the optimization process.

To mitigate this side effect you can follow these hints:

  • Reduce the cache lifetime to a lower value, in this way the cache is cleared more often
    jspeed cache

  • Disable includes of inline, imported and external resources
    jspeed resources

  • Exclude JS and CSS resources, both external and inline elements until the cache decreases
    jspeed exclusions

  • Disable combining of JS/CSS files
    jspeed combining

  • Periodically clear the cache folder by clicking on the button 'Clear cache'
    jspeed clear cache

  • Schedule a server cronjob
    You can schedule a server cronjob that automatically clears the folder: root/cache/plg_jspeed
    This is the folder used by the JSpeed plugin to store temporary optimized files, if needed you can contact your hosting provider to ask to configure such an automated script in order to periodically delete that folder.