diff --git a/lib/multi_caching.js b/lib/multi_caching.js index b6fe440..138d29e 100644 --- a/lib/multi_caching.js +++ b/lib/multi_caching.js @@ -43,9 +43,9 @@ var multi_caching = function (caches) { get_from_highest_priority_cache(key, function (err, result, index) { if (err) { return cb(err); } if (result) { - var caches_to_set = caches.slice(0, index); - set_in_multiple_caches(caches_to_set, key, result, function (err) { - return cb(err, result); + var caches_to_update = caches.slice(0, index); + set_in_multiple_caches(caches_to_update, key, result, function (err) { + cb(err, result); }); } else { work(function () {