Skip to content

Commit

Permalink
Type and document cache and cacheSize opts
Browse files Browse the repository at this point in the history
  • Loading branch information
miraclx committed Jul 2, 2020
1 parent 3aefee0 commit 4061cb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ With 10 simultaneous downloads. Retrying each one to a max of 10.
- `auto`: <[boolean][]> Whether or not to start the request automatically or wait for a `request.start()` call (useful when chaining events you want to fire in order). **Default**: `true`
- `size`: <[number][]> Number of bytes to stream off the response.
- `hash`: <[string][]> Hash algorithm to use to create a [crypto.Hash][] instance computing the stream hash.
- `cache`: <[number][]> Whether or not to use an in-memory cache to enable read-aheads of pending chunks.
- `cacheSize`: <[boolean][]> Custom maximum cache size (bytes).
- `use`: <[object][]> Key-value pairs of middlewares with which to pipe the response object through. keys are [strings][string], values are [Transformer generating functions](#usemiddlewarefn) (Alternatively, use the [xget.use()](#xgetuse) method).
- `with`: <[object][]> Key-value pairs of middlewares with which to pipe the dataslice object through. keys are [strings][string], values are [functions][function] whose return values are accessible within the [store](#storestack). (Alternatively, use the [xget.with()](#xgetwith) method).
- `headHandler`: <[HeadHandler](#headhandler)> An interceptor for the initial HEAD data, useful for programmatically defining a range offset;
Expand Down
2 changes: 2 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ declare namespace xget {
with: WithMiddlewareFn;
start: number;
chunks: number;
cache: boolean;
cacheSize: number;
retries: number;
timeout: number;
headHandler: HeadHandler;
Expand Down

0 comments on commit 4061cb0

Please sign in to comment.