diff --git a/lib/middlewares/populateSettings.js b/lib/middlewares/populateSettings.js index 9c4e6ec2..5f36fa69 100644 --- a/lib/middlewares/populateSettings.js +++ b/lib/middlewares/populateSettings.js @@ -82,7 +82,7 @@ const populateSettings = function (req, res, next) { const operatorSettings = settingsCache.get(`${operatorId}-latest`) - if (!versionId && (!!needsSettingsReload[operatorId] || !operatorSettings)) { + if (!!needsSettingsReload[operatorId] || !operatorSettings) { !!needsSettingsReload[operatorId] ? logger.debug('Fetching and caching a new latest config value, as a reload was requested') : logger.debug('Fetching the latest config version because there\'s no cached value') @@ -97,11 +97,9 @@ const populateSettings = function (req, res, next) { .catch(next) } - if (!versionId && operatorSettings) { - logger.debug('Fetching the latest config value from cache') - req.settings = operatorSettings - return next() - } + logger.debug('Fetching the latest config value from cache') + req.settings = operatorSettings + return next() } catch (e) { logger.error(e) }