使用async实现多个请求并发
// 写法一 let [cache, cache2] = await Promise.all([cachePromise, cachePromise2]); // 写法二 let Promise= cachePromise(); let Promise2= cachePromise2(); let cache= await Promise; let cache2= await Promise2;
// 写法一 let [cache, cache2] = await Promise.all([cachePromise, cachePromise2]); // 写法二 let Promise= cachePromise(); let Promise2= cachePromise2(); let cache= await Promise; let cache2= await Promise2;