@autofleet/settings 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -161,7 +161,9 @@ class SettingsManager {
161
161
  this.settingsCache.del(cacheKey);
162
162
  throw err;
163
163
  }
164
- this.settingsCache.set(cacheKey, returnValue, this.ttl);
164
+ if (settingsToFetch.indexOf(setting.key) !== -1) {
165
+ this.settingsCache.set(cacheKey, returnValue, this.ttl);
166
+ }
165
167
  return returnValue;
166
168
  });
167
169
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/settings",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -213,7 +213,9 @@ class SettingsManager {
213
213
  this.settingsCache.del(cacheKey);
214
214
  throw err;
215
215
  }
216
- this.settingsCache.set(cacheKey, returnValue, this.ttl);
216
+ if (settingsToFetch.indexOf(setting.key) !== -1) {
217
+ this.settingsCache.set(cacheKey, returnValue, this.ttl);
218
+ }
217
219
  return returnValue;
218
220
  });
219
221
  }