Browse Source

using isCacheableValue in getFromHighestPriorityCache and getAndPassUp

feature/fix-isCacheableValue-usage
Bryan Donovan 9 years ago
parent
commit
ee42ac343f
  1. 4
      lib/multi_caching.js

4
lib/multi_caching.js

@ -43,7 +43,7 @@ var multiCaching = function(caches, options) {
if (err) { if (err) {
return next(err); return next(err);
} }
if (result) { if (self._isCacheableValue(result)) {
// break out of async loop. // break out of async loop.
return cb(err, result, i); return cb(err, result, i);
} }
@ -78,7 +78,7 @@ var multiCaching = function(caches, options) {
cb(err, result); cb(err, result);
if (result !== undefined && index) { if (self._isCacheableValue(result) && index) {
var cachesToUpdate = caches.slice(0, index); var cachesToUpdate = caches.slice(0, index);
async.each(cachesToUpdate, function(cache, next) { async.each(cachesToUpdate, function(cache, next) {
// We rely on the cache module's default TTL // We rely on the cache module's default TTL

Loading…
Cancel
Save