From ee42ac343fd251e550363035527be45376919e35 Mon Sep 17 00:00:00 2001 From: Bryan Donovan Date: Wed, 7 Oct 2015 13:39:29 -0700 Subject: [PATCH 1/2] using isCacheableValue in getFromHighestPriorityCache and getAndPassUp --- lib/multi_caching.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 9a1ad821e6fa915f51a824f2094d48b0e8d9f5ac Mon Sep 17 00:00:00 2001 From: Bryan Donovan Date: Wed, 7 Oct 2015 13:41:40 -0700 Subject: [PATCH 2/2] 1.2.0 --- History.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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/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": {