[英]MODX: Is there a way to disable caching for templates completely?
I'm developing a site locally with XAMPP.我正在使用 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.目前,每当我更新模板文件时,我都需要在管理器中手动清除 MODX 的缓存,然后才能看到前端的任何更改。 This is a bit of a pain and doesnt really work with my task runners.
这有点痛苦,并且不适用于我的任务运行器。
In the settings area I've turned off:在我关闭的设置区域中:
And turned on并开启
But there is no changes.但是没有任何变化。
Is there some other setting I'm missing?我还缺少其他一些设置吗?
Is there some CLI commands I could use to do this?是否有一些 CLI 命令可以用来执行此操作?
I think you are looking for cache_resource
setting.我认为您正在寻找
cache_resource
设置。 You can set it to No
on your dev environment.您可以在开发环境中将其设置为
No
More information: https://docs.modx.com/current/en/building-sites/settings/cache_resource更多信息: https : //docs.modx.com/current/en/building-sites/settings/cache_resource
You can write a gulp task watching for some changes in templates and cleaning Modx cache.您可以编写一个 gulp 任务来监视模板中的某些更改并清理 Modx 缓存。 Then necessery run it every time you start to work.
然后每次开始工作时都必须运行它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.