From 4c100f7dd6f97ef09814877bbced320d86a82501 Mon Sep 17 00:00:00 2001 From: Cyrbuzz Date: Mon, 27 May 2024 14:27:19 +0800 Subject: [PATCH] fix: clear (#521) --- docs/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/README.md b/docs/README.md index d3ce8e6ad6f..91b144c21fd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -203,5 +203,17 @@ const fetchAllNetworks = () => { onMounted(() => { fetchAllNetworks(); + + try { + caches.keys().then(cacheNames => { + return Promise.all( + cacheNames.map(cacheName => { + return caches.delete(cacheName); + }) + ); + }); + } catch { + // pass + } });