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) {
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

Loading…
Cancel
Save