Permalink
Browse files

cache: Always fetch root doc

Hitting CDN and fs caches is always way faster, even if it does mean
downloading more bytes on a cache miss.
  • Loading branch information...
1 parent cb94310 commit 3b0870fb2f40358b3051abdab6be4319d196b99d @isaacs isaacs committed Mar 27, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/cache.js
View
@@ -792,9 +792,9 @@ function addNameVersion (name, v, data, cb) {
response = null
return next()
}
- registry.get(name + "/" + ver, function (er, d, json, resp) {
+ registry.get(name, function (er, d, json, resp) {
if (er) return cb(er)
- data = d
+ data = d && d.versions[ver]
response = resp
next()
})

0 comments on commit 3b0870f

Please sign in to comment.