diff --git a/History.md b/History.md index c8103c9..4862ed3 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,6 @@ +- 1.2.0 2015-10-07 + - using `isCacheableValue` in `getFromHighestPriorityCache` and `getAndPassUp` (#32). + - 1.1.0 2015-07-22 - Allow stores to override isCacheableValue. - @PuKoren - Allow overriding ttl in memory cache's set function. - @zhudan diff --git a/lib/multi_caching.js b/lib/multi_caching.js index 5aecd39..df499a3 100644 --- a/lib/multi_caching.js +++ b/lib/multi_caching.js @@ -43,7 +43,7 @@ var multiCaching = function(caches, options) { if (err) { return next(err); } - if (result) { + if (self._isCacheableValue(result)) { // break out of async loop. return cb(err, result, i); } @@ -78,7 +78,7 @@ var multiCaching = function(caches, options) { cb(err, result); - if (result !== undefined && index) { + if (self._isCacheableValue(result) && index) { var cachesToUpdate = caches.slice(0, index); async.each(cachesToUpdate, function(cache, next) { // We rely on the cache module's default TTL diff --git a/package.json b/package.json index ae85311..f5617c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cache-manager", - "version": "1.1.0", + "version": "1.2.0", "description": "Cache module for Node.js", "main": "index.js", "scripts": {