docs: added docs for #506 (#509)

* Fix #506

* fix fmt

* fix docs

* fix docs
This commit is contained in:
Guilherme Mazoni 2023-02-24 11:38:16 -03:00 committed by GitHub
parent ee8b6b36a1
commit 473f11c96b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -308,7 +308,8 @@ const customPredicate = (response, cache, error) => {
Types:
- `number` -> the max time (in seconds) that the cache can be reused.
- `boolean` -> `false` disables and `true` enables with infinite time.
- `boolean` -> `false` disables and `true` enables with infinite time if no value is
present on `stale-if-error` in Cache-Control.
- `function` -> a predicate that can return `number` or `boolean` as described above.
## cache.override

3
src/cache/cache.ts vendored
View File

@ -164,7 +164,8 @@ export type CacheProperties<R = unknown, D = unknown> = {
* Types:
*
* - `number` -> the max time (in seconds) that the cache can be reused.
* - `boolean` -> `false` disables and `true` enables with infinite time.
* - `boolean` -> `false` disables and `true` enables with infinite time if no value is
* present on `stale-if-error` in Cache-Control.
* - `function` -> a predicate that can return `number` or `boolean` as described above.
*
* @default true