Skip to content

Commit 6beb52e

Browse files
authored
bump node-cache to 4.2.1 (#264)
* bump node-cache to 4.2.1 * update data cache strategy to follow the spec of node-cache@4.2.1 * 2.6.107
1 parent 3e34d4b commit 6beb52e

3 files changed

Lines changed: 836 additions & 1757 deletions

File tree

data-cache.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,7 @@ class DefaultDataCacheStrategy extends DataCacheStrategy {
127127
if (err) {
128128
return reject(err);
129129
}
130-
if (Object.prototype.hasOwnProperty.call(res, key)) {
131-
return resolve(res[key]);
132-
}
133-
return resolve();
130+
return resolve(res);
134131
});
135132
} catch (err) {
136133
return reject(err);
@@ -204,9 +201,7 @@ class DefaultDataCacheStrategy extends DataCacheStrategy {
204201
try {
205202
void self.rawCache.get(key, (err, res) => {
206203
if (typeof res !== 'undefined') {
207-
if (Object.prototype.hasOwnProperty.call(res, key)) {
208-
return resolve(res[key]);
209-
}
204+
return resolve(res);
210205
}
211206
try {
212207
void getFunc().then(function (res) {

0 commit comments

Comments
 (0)