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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/index.js +2 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -46,6 +46,7 @@ Options:
46
46
  {
47
47
  primaryKey: null, // The primary key to use as the master key for key derivation.
48
48
  writable: true,
49
+ treeCache: { maxSize: 8192 } // Options to use when creating hypercore's default storage
49
50
  }
50
51
  ```
51
52
 
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 })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corestore",
3
- "version": "7.11.0",
3
+ "version": "7.12.0",
4
4
  "description": "A Hypercore factory that simplifies managing collections of cores.",
5
5
  "main": "index.js",
6
6
  "files": [