DEV Community

Discussion on: Cache Busting a React App

Collapse
 
amanchaudhary1998 profile image
AmanChaudhary1998

<if (caches) {

            const names = await caches.keys();

            console.log(names);

            await Promise.all(names.map((name)=> caches.delete(name)))

        }
        window.location.reload();
Enter fullscreen mode Exit fullscreen mode

These will fall into infinite loop can any one help me how to solve these issue>