Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caching in Node Express: How do you whitelist/blacklist views?

Express has a builtin cache mechanism, set up with app.enable('view cache'). But how do you discriminate between views which should be cached and views which should always be served fresh?

like image 684
mahemoff Avatar asked Aug 02 '11 18:08

mahemoff


1 Answers

I don't know the details, but I think it caches everything. What I mean is that it puts all views inside memory. I don't think you should discriminate between views and should just cache all views. If you don't want this, you could just do the caching yourself by putting them in memory or Redis or something.

But I would advice you to fill issue at Github. I bet TJ will response to that at Github, but does not read this, because at Github he gets email and Stackoverflow he does not.

like image 172
Alfred Avatar answered Nov 15 '22 08:11

Alfred