mirror of
https://github.com/imputnet/cobalt.git
synced 2025-12-14 12:15:21 +00:00
web/storage: add clearCacheStorage function
Some checks are pending
Some checks are pending
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user