Caching with Connect/Express

62 views
Skip to first unread message

Kevin Ingwersen (Ingwie Phoenix)

unread,
Mar 27, 2015, 1:01:59 PM3/27/15
to nod...@googlegroups.com
Hey everyone!

My current project is based on using Express - or connect, still trying out which is better… - and serves a good amount of static files that are likely to not change in a long time during production.

But the current cache-hell that I have is pretty … ugly. I mean, just look at this:


Isn’t there a MUCH easier solution than the way I chose? I want to be able to cache all the served images, css, js and oj scripts in the browser…but how can I do it „right“? This just looks like a big mess to me really...

Daniel Rinehart

unread,
Mar 28, 2015, 6:10:06 PM3/28/15
to nodejs
A common option to put a caching HTTP reverse proxy in front of node and let that handle all of the caching logic. Varnish Cache and NGINX Content Caching are popular options.

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/F9373170-E98B-4534-B954-340C095C215F%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Ingwersen (Ingwie Phoenix)

unread,
Mar 29, 2015, 12:23:35 AM3/29/15
to nod...@googlegroups.com
I am using Socket.IO over the same HTTP instance as my Express app. Does a reverse proxy like Varnish or the NGINX method support that?

Daniel Rinehart

unread,
Mar 31, 2015, 11:45:38 AM3/31/15
to nodejs

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.

Kevin Ingwersen (Ingwie Phoenix)

unread,
Mar 31, 2015, 7:55:33 PM3/31/15
to nod...@googlegroups.com
Varnish looks very, very awesome. I already have Nginx installed, but the caching options for Nginx seem dizzy to me or I have read wrong pages. Varnish seems very solid and has great reviews about its capabilities. Good thing my server has 5 IPs…and only 2 are actively used. :)
Reply all
Reply to author
Forward
0 new messages