Hi, what system settings I must set to disable caching for local development? I have templates, chunks and snippets on the filesystem and like to develop my theme, but every change on the filesystem requires a clear cache on the manager. I've tried "cache_disabled" set to true or "cache_scripts" set to false without any effects.
Any suggestions to allow a smart development on file system without the need to use the manager at every single file change?
Thanks
Ralf
-
☆ A M B ☆
- 24,524 Posts
In the System Settings, the Filter by area selection, choose Cache. You can turn off caching altogether for the development by setting the cache_disable setting to Yes.
Hi Susan,
sorry, I've already tried that, but changes on file system will only take effect after clear cache. Hm...
ciao
Ralf
There's some info here that might help:
https://forums.modx.com/thread/87316/how-does-everyone-work-with-static-template-files#dis-post-481124.
I could be wrong, but I don't think cache_disabled actually does anything in the current version of MODX.
Thanks Bob and rwam_de,
cacheclear snippet solved this problem but it does feel a bit hackish.
I'm using v 2.3.1 and the "Disable Global Cache Options" setting still doesn't apply to static elements, which seems to be a glaring oversight. The whole point of using static elements is to be able to develop in a proper IDE and see changes right away. The cache must be completely off during development. Having to paste a snippet into a template just to clear the cache detracts from MODx, which claims to be a platform for developers yet doesn't support the most basic development workflow.
That's pretty much what the cacheclear snippet does from inside MODX. You could put a button for it on the Manager's main menu (though I usually launch it in a new tab and just reload that page when I need to whole cache cleared.
I like it because it only runs when I want it to and doesn't tie up server resources. YMMV