MODX: Is there a way to disable caching for templates completely?

940 views Asked by At

I'm developing a site locally with XAMPP. I am using static files for templates, snippets and chunks.

Currently, whenever I update a template file I need to manually clear MODX's cache in the Manager before I see any changes on the front end. This is a bit of a pain and doesnt really work with my task runners.

In the settings area I've turned off:

  • Cacheable default
  • Enable Script Cache
  • Enable System Setting Cache

And turned on

  • Disable Global Cache Options

But there is no changes.

Is there some other setting I'm missing?

Is there some CLI commands I could use to do this?

2

There are 2 answers

1
Eugene Krysanov On

You can write a gulp task watching for some changes in templates and cleaning Modx cache. Then necessery run it every time you start to work.

0
Zaigham R. On

I think you are looking for cache_resource setting. You can set it to No on your dev environment.

More information: https://docs.modx.com/current/en/building-sites/settings/cache_resource