Skip to content

Commit

Permalink
Document maxCacheSize opt and getter
Browse files Browse the repository at this point in the history
  • Loading branch information
HDegroote committed Jun 17, 2024
1 parent a1e86b8 commit 9dc5537
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ Make a new Hyperbee instance. `core` should be a [Hypercore](https://github.com/
```js
{
keyEncoding: 'binary', // "binary" (default), "utf-8", "ascii", "json", or an abstract-encoding
valueEncoding: 'binary' // Same options as keyEncoding like "json", etc
valueEncoding: 'binary', // Same options as keyEncoding like "json", etc
maxCacheSize: 65536 // Max size of the key and node cache
}
```

Expand Down Expand Up @@ -107,6 +108,10 @@ Boolean indicating if we can put or delete data in this bee.

Boolean indicating if we can read from this bee. After closing the bee this will be `false`.

#### `db.maxCacheSize`

Integer indicating the max size of the caches (both the node and the key cache).

#### `await db.put(key, [value], [options])`

Insert a new key. Value can be optional.
Expand Down

0 comments on commit 9dc5537

Please sign in to comment.