From ee42ac343fd251e550363035527be45376919e35 Mon Sep 17 00:00:00 2001 From: Bryan Donovan Date: Wed, 7 Oct 2015 13:39:29 -0700 Subject: [PATCH] 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