Skip to content

Commit 6fc0078

Browse files
committed
changing async.forEach to each and async.forEachSeries to eachSeries
1 parent 5bcc45f commit 6fc0078

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/multi_caching.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var multi_caching = function(caches) {
2020
}
2121

2222
var i = 0;
23-
async.forEachSeries(caches, function(cache, async_cb) {
23+
async.eachSeries(caches, function(cache, async_cb) {
2424
var callback = function(err, result) {
2525
if (err) {
2626
return cb(err);
@@ -42,7 +42,7 @@ var multi_caching = function(caches) {
4242
}
4343

4444
function set_in_multiple_caches(caches, opts, cb) {
45-
async.forEach(caches, function(cache, async_cb) {
45+
async.each(caches, function(cache, async_cb) {
4646
if (typeof opts.options !== 'object') {
4747
cache.store.set(opts.key, opts.value, opts.ttl, async_cb);
4848
} else {
@@ -66,7 +66,7 @@ var multi_caching = function(caches) {
6666

6767
if (result !== undefined && index) {
6868
var cachesToUpdate = caches.slice(0, index);
69-
async.forEach(cachesToUpdate, function(cache, async_cb) {
69+
async.each(cachesToUpdate, function(cache, async_cb) {
7070
cache.set(key, result, result.ttl, async_cb);
7171
});
7272
}
@@ -171,7 +171,7 @@ var multi_caching = function(caches) {
171171
cb = options;
172172
options = false;
173173
}
174-
async.forEach(caches, function(cache, async_cb) {
174+
async.each(caches, function(cache, async_cb) {
175175
if (typeof options === 'object') {
176176
cache.store.del(key, options, async_cb);
177177
} else {

0 commit comments

Comments
 (0)