mirror of
https://github.com/hanzoai/workbox.git
synced 2026-09-24 17:04:35 +00:00
changing durability to relaxed (#2934)
* changing durability to be relaxed * fix bug * add QueueDB add to be durability relaxed
This commit is contained in:
@@ -56,7 +56,9 @@ export class QueueDb {
|
||||
*/
|
||||
async addEntry(entry: UnidentifiedQueueStoreEntry): Promise<void> {
|
||||
const db = await this.getDb();
|
||||
await db.add(REQUEST_OBJECT_STORE_NAME, entry as QueueStoreEntry);
|
||||
const tx = db.transaction(REQUEST_OBJECT_STORE_NAME, 'readwrite', { durability: 'relaxed' });
|
||||
await tx.store.add(entry as QueueStoreEntry);
|
||||
await tx.done;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -111,7 +111,9 @@ class CacheTimestampsModel {
|
||||
id: this._getId(url),
|
||||
};
|
||||
const db = await this.getDb();
|
||||
await db.put(CACHE_OBJECT_STORE, entry);
|
||||
const tx = db.transaction(CACHE_OBJECT_STORE, 'readwrite', {durability: 'relaxed'});
|
||||
await tx.store.put(entry);
|
||||
await tx.done;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user