From 5a2eb752e0ce42ff3b37d73efc4840eedf5e31d1 Mon Sep 17 00:00:00 2001 From: Michael Kriese <michael.kriese@visualon.de> Date: Mon, 24 Jun 2019 12:17:02 +0200 Subject: [PATCH] fix(got): repoCache was not updated (#3958) --- lib/util/got/cache-get.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/util/got/cache-get.js b/lib/util/got/cache-get.js index 51d160054e..82c3049a72 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 => ({ -- GitLab