在加载每个值时,我应该在Load
之后在每个Key上调用loadMany
函数吗?哪种方法正确:1还是2?
var keys = [1, 2, 3, 4]
var matchedRules = matchedRuleLoader.loadMany(keys))
// 1
for (const matchedRule of matchedRules) {
console.log(matchedRule)
}
// 2
for (const key of keys) {
console.log(matchedRuleLoader.load(key))
}