totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

Why is static file caching not working? #764

Closed dispbd closed 3 years ago

dispbd commented 4 years ago

Hello. I can't figure out why static file caching doesn't work. There are many options on the Internet for configuring nginx. For instance, any of them:

https://belvg.com/blog/static-content-caching-with-nginx.html https://stackoverflow.com/questions/40688536/nginx-cache-whole-node-express-application https://gist.github.com/mattd/1006398/598df8f218a18bc1b0f3415550b4a369f37afb7c

But none of them work! I'm already starting to sin on the Total.js. In my view engine, this is done for example - @{image('logo.gif')} or @{js('default.js')}. nginx overload after changing settings and all other nginx settings work fine.!

Can you please tell me what's the matter?

petersirka commented 4 years ago

Hi @dispbd, the question is: in which mode is your app running? Because debug mode disables cache, for example try www.totaljs.com (it uses Total.js CMS with Total.js v3).