fix: address cache revalidation feedback

This commit is contained in:
Shivam Mishra
2026-05-29 16:28:19 +05:30
parent 264987624d
commit b8bca46ba8
2 changed files with 30 additions and 10 deletions
@@ -19,9 +19,9 @@ export class DataManager {
// first install, so fresh devices skip this. Clearing before creating
// means we only ever clear stores that pre-existed this upgrade.
if (oldVersion > 0) {
[...db.objectStoreNames].forEach(name =>
tx.objectStore(name).clear()
);
for (let index = 0; index < db.objectStoreNames.length; index += 1) {
tx.objectStore(db.objectStoreNames.item(index)).clear();
}
}
if (!db.objectStoreNames.contains('cache-keys')) {