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