|
|
@ -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
|
|
|
|