mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-09 18:24:27 +02:00
web/storage: add clearCacheStorage function
This commit is contained in:
parent
1f79bf6e52
commit
dc33c07b39
@ -64,6 +64,14 @@ export const clearFileStorage = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
export const clearCacheStorage = async () => {
|
||||
const keys = await caches.keys();
|
||||
|
||||
for (const key of keys) {
|
||||
caches.delete(key);
|
||||
}
|
||||
}
|
||||
|
||||
export const getStorageQuota = async () => {
|
||||
let estimate;
|
||||
if (navigator.storage.estimate) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user