Caching http://registry.npmjs.org/ aggressively with squid
We run a lot of project in our automated test environment and they spend a lot of time doing npm install.
One way to speed up npm install and hammer the registry a little less is to use the http-version of the registry and to pass the requests through a proxy.
However, the npm requests include an authorization-header and the responses come with an ETag and Cache-Control: max-age=60, so with default squid settings there is a lot of roundtrips to registry.npmjs.org that result in 304's.
This is what the requests look like once npm has cached the first set of responses:
GET http://registry.npmjs.org/sntp HTTP/1.1