Open pi0neer opened 5 years ago
https://github.com/ericf/express-handlebars#template-caching
Try passing cache: false
as an option to the render
call
It doesn't seem right in my opinion. I just wanna disable it for whole app at once, instead of passing a prop to each render call, also it's really uncomfortable in case of a big app. Documentation even says that is easiest way to control template/view caching and i would like to do it so.
Hi there. I have two question regarding cache in production. Ask it here because found the question similar to myself.
Yes caching is default behavior
Thanks for response. So please, how to avoid page cache while still taking advantage of this default caching behavior?
app.disable('view cache');
Yeah, but then It reads the template from disk for each request. This is a test with inotify
:
morteza@pc1:~/accounting$ inotifywait views/home.hbs
Setting up watches.
Watches established.
views/home.hbs OPEN <-- here we receive a new http request
P.S. Clarification: Readme has already been read and question was regarding production mode.
I'm confused with template caching, i've disabled it with
app.disable('view cache');
. In development everything is fine, but in production templates are still cached anyways. How can i disable it?