isaacs/npm-www — pull request #272 by robertkowalski (2013-03-18 01:03:09+00:00)
Title: Throw 404 in case of an unpublished module - fix #271

It seems to me like npm-registry-client caches the response-json in case of a 404 error as a valid document and/or reads the cache in case of a 404 status code.

https://github.com/isaacs/npm-registry-client/blob/master/lib/get.js#L115

Example cache:

```
{"error":"not_found","reason":"document not found"}
```

I fixed the resulting behaviour from that caches in the npm-www app, but maybe it is worth to fix the root cause in the npm-registry-client. What do you think?