From 6fc00781c7926091e716dc5bc899b9fd7614957e Mon Sep 17 00:00:00 2001 From: Bryan Donovan Date: Sat, 7 Feb 2015 12:09:54 -0800 Subject: [PATCH] changing async.forEach to each and async.forEachSeries to eachSeries --- lib/multi_caching.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/multi_caching.js b/lib/multi_caching.js index 72d67df..6fbf3b2 100644 --- a/lib/multi_caching.js +++ b/lib/multi_caching.js @@ -20,7 +20,7 @@ var multi_caching = function(caches) { } var i = 0; - async.forEachSeries(caches, function(cache, async_cb) { + async.eachSeries(caches, function(cache, async_cb) { var callback = function(err, result) { if (err) { return cb(err); @@ -42,7 +42,7 @@ var multi_caching = function(caches) { } function set_in_multiple_caches(caches, opts, cb) { - async.forEach(caches, function(cache, async_cb) { + async.each(caches, function(cache, async_cb) { if (typeof opts.options !== 'object') { cache.store.set(opts.key, opts.value, opts.ttl, async_cb); } else { @@ -66,7 +66,7 @@ var multi_caching = function(caches) { if (result !== undefined && index) { var cachesToUpdate = caches.slice(0, index); - async.forEach(cachesToUpdate, function(cache, async_cb) { + async.each(cachesToUpdate, function(cache, async_cb) { cache.set(key, result, result.ttl, async_cb); }); } @@ -171,7 +171,7 @@ var multi_caching = function(caches) { cb = options; options = false; } - async.forEach(caches, function(cache, async_cb) { + async.each(caches, function(cache, async_cb) { if (typeof options === 'object') { cache.store.del(key, options, async_cb); } else {