mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Clear cache when it is disabled
This commit is contained in:
@@ -208,6 +208,16 @@ async function idbFolderCleanup(keepSet, folder, signal) {
|
||||
});
|
||||
}
|
||||
|
||||
async function idbClearAll(signal) {
|
||||
if (!db) return null;
|
||||
return new Promise((resolve, reject) => {
|
||||
const transaction = db.transaction(['thumbs'], 'readwrite');
|
||||
const props = { transaction, signal, resolve, reject };
|
||||
configureTransactionAbort(props, null);
|
||||
transaction.objectStore('thumbs').clear();
|
||||
});
|
||||
}
|
||||
|
||||
window.idbAdd = add;
|
||||
window.idbDel = del;
|
||||
window.idbGet = get;
|
||||
|
||||
Reference in New Issue
Block a user