diff --git a/lib/util/got/cache-get.js b/lib/util/got/cache-get.js index 51d160054e63828810c2d580f07273dee12f3849..82c3049a721e9d80dc4ddeb3430d58bb59175b60 100644 --- a/lib/util/got/cache-get.js +++ b/lib/util/got/cache-get.js @@ -13,9 +13,6 @@ module.exports = got.create({ if (!global.repoCache) { return next(options); } - if (options.useCache === false) { - return next(options); - } if (options.stream) { return next(options); } @@ -27,7 +24,7 @@ module.exports = got.create({ JSON.stringify({ href: options.href, headers: options.headers }) ) .digest('hex'); - if (!global.repoCache[cacheKey]) { + if (!global.repoCache[cacheKey] || options.useCache === false) { global.repoCache[cacheKey] = next(options); } return global.repoCache[cacheKey].then(response => ({