diff options
author | John Hiesey <john@hiesey.com> | 2021-06-30 23:19:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-30 23:19:18 +0300 |
commit | d540058ebd7f32e613d26c33e8a99b16d39a13d8 (patch) | |
tree | 43b93ccb50b0c5fcd3a9379eef671a6089a76739 /docs | |
parent | 421d6c90edb197be2f8c948eb1b15d8adb8f7dae (diff) |
feat: Use a cache on the chunk store (#2095)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/api.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/api.md b/docs/api.md index f64d2be..5302f95 100644 --- a/docs/api.md +++ b/docs/api.md @@ -94,6 +94,7 @@ If `opts` is specified, then the default options (shown below) will be overridde private: Boolean, // If true, client will not share the hash with the DHT nor with PEX (default is the privacy of the parsed torrent) store: Function // Custom chunk store (must follow [abstract-chunk-store](https://www.npmjs.com/package/abstract-chunk-store) API) destroyStoreOnDestroy: Boolean // If truthy, client will delete the torrent's chunk store (e.g. files on disk) when the torrent is destroyed + storeCacheSlots: Number // Number of chunk store entries (torrent pieces) to cache in memory [default=20]; 0 to disable caching } ``` @@ -110,7 +111,7 @@ If you provide `opts.store`, it will be called as * `storeOpts.length` - size of all the files in the torrent * `storeOpts.files` - an array of torrent file objects -* `storeOpts.torrent` - the torrent instance being stored +* `storeOpts.name` - the info hash of the torrent instance being stored **Note:** Downloading a torrent automatically seeds it, making it available for download by other peers. |