mixu/npm_lazy — pull request #37 by CL0SeY (2014-06-28 10:11:00+00:00)
Title: Retrieve and respond on index using etags and handling 304's

Hi,

This change should ensure that the following happens:
1. When the npm_lazy cache is requesting from the parent cache, it will send the etag in the "if-none-match" header. This will enable the parent cache to respond with a 304, reducing network traffic and latency to the client. The etag is persisted in the meta json.
2. When the npm client asks for an index and gets a 304 (based on etag), it will then know that it doesn't need to retrieve any other packages. The 304 response will also reduce network load. The etag provided in this case is the same one from the meta json from above.

Note that no etag management has specifially been done for the package files, as these should be getting cached on the client and server indefinitely.

Any feedback most welcome.