corestore 7.11.0 → 7.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/index.js +2 -7
- package/package.json +1 -1
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -243,7 +243,8 @@ class Corestore extends ReadyResource {
|
|
|
243
243
|
id: opts.id,
|
|
244
244
|
allowBackup: opts.allowBackup,
|
|
245
245
|
readOnly: opts.readOnly,
|
|
246
|
-
wait: opts.wait
|
|
246
|
+
wait: opts.wait,
|
|
247
|
+
treeCache: opts.treeCache
|
|
247
248
|
})
|
|
248
249
|
this.streamTracker = this.root ? this.root.streamTracker : new StreamTracker()
|
|
249
250
|
this.cores = this.root ? this.root.cores : new CoreTracker()
|
|
@@ -348,12 +349,6 @@ class Corestore extends ReadyResource {
|
|
|
348
349
|
}
|
|
349
350
|
|
|
350
351
|
async suspend({ log = noop } = {}) {
|
|
351
|
-
await log('Flushing db...')
|
|
352
|
-
// If readOnly we don't need to flush
|
|
353
|
-
if (!this.storage.readOnly) {
|
|
354
|
-
await this.storage.db.flush()
|
|
355
|
-
await log('Flusing db completed')
|
|
356
|
-
}
|
|
357
352
|
if (!this.shouldSuspend) return
|
|
358
353
|
await log('Suspending db...')
|
|
359
354
|
await this.storage.suspend({ log })
|