@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 +3 -1
- package/package.json +1 -1
- package/src/index.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -161,7 +161,9 @@ class SettingsManager {
|
|
|
161
161
|
this.settingsCache.del(cacheKey);
|
|
162
162
|
throw err;
|
|
163
163
|
}
|
|
164
|
-
|
|
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
package/src/index.ts
CHANGED
|
@@ -213,7 +213,9 @@ class SettingsManager {
|
|
|
213
213
|
this.settingsCache.del(cacheKey);
|
|
214
214
|
throw err;
|
|
215
215
|
}
|
|
216
|
-
|
|
216
|
+
if (settingsToFetch.indexOf(setting.key) !== -1) {
|
|
217
|
+
this.settingsCache.set(cacheKey, returnValue, this.ttl);
|
|
218
|
+
}
|
|
217
219
|
return returnValue;
|
|
218
220
|
});
|
|
219
221
|
}
|