mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 17:38:31 +00:00
web/storage: add clearCacheStorage function
Some checks are pending
Some checks are pending
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 () => {
|
export const getStorageQuota = async () => {
|
||||||
let estimate;
|
let estimate;
|
||||||
if (navigator.storage.estimate) {
|
if (navigator.storage.estimate) {
|
||||||
|
Loading…
Reference in New Issue
Block a user