What files to exclude in cache plugin?

In order for things to run smoothly on the backend running Pro, what files should I exclude from being cached?

Hi @threeoten,

Thanks for reaching out.

If you’re on CloudFlare, you can exclude the URL wildcard of *example.com/pro* and *example.com/cornerstone-endpoint* replacing `example.com with your own domain. Please check this https://support.cloudflare.com/hc/en-us/articles/200172316-How-do-I-include-or-exclude-a-specific-URL-from-Cloudflare-s-page-rules-

If your cache plugin has the same feature then you can do the same, else, you’ll have to contact the caching plugin on how to exclude the specific area from the cache.

There is no point excluding static files from the cache, it may only change after upgrades or updates. The idea of excluding the entire area like *example.com/pro* from cache is for the dynamic content being built, and it’s not because of the static files.

But, you need to exclude minified files from plugin’s minification, else it will break. Here are the files needed for exclusion from minification

  1. wp-content/themes/x/framework/dist/js/site/x.js
    and wp-content/themes/pro/framework/dist/js/site/x.js

  2. wp-content/plugins/cornerstone/assets/dist/js/site/cs.f8bd973.js
    and wp-content/themes/pro/cornerstone/assets/dist/js/site/cs.f8bd973.js

  3. wp-content/plugins/cornerstone/assets/dist-app/js/cs-vendor.f8bd973.js
    and wp-content/themes/pro/cornerstone/assets/dist-app/js/cs-vendor.f8bd973.js

The f8bd973 is unique per released version, you may need to check the file directly to see the correct version

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.