diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-10-31 06:32:32 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-10-31 11:18:12 +0300 |
commit | ed619714c93718b6c1922b8c286f4b6cd2b97c80 (patch) | |
tree | 738d6648c45cb8f092ae40f3f0e4b41e42082f03 /lib/search.js | |
parent | 239c3086cc1cbee651f9ec85609b8dd3ab8258d7 (diff) |
directly cache search metadata
Diffstat (limited to 'lib/search.js')
-rw-r--r-- | lib/search.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/search.js b/lib/search.js index 68139a7ac..ad3f312e5 100644 --- a/lib/search.js +++ b/lib/search.js @@ -4,6 +4,7 @@ module.exports = exports = search var npm = require("./npm.js") , columnify = require("columnify") , mapToRegistry = require("./utils/map-to-registry.js") + , updateIndex = require("./cache/update-index.js") search.usage = "npm search [some search terms ...]" @@ -66,7 +67,7 @@ function getFilteredData (staleness, args, notArgs, cb) { staleOk : true, auth : auth } - npm.registry.getAll(uri, params, function (er, data) { + updateIndex(uri, params, function (er, data) { if (er) return cb(er) return cb(null, filter(data, args, notArgs)) }) |