diff --git a/docs/src/config/request-specifics.md b/docs/src/config/request-specifics.md index 4a9ca90..3fec46f 100644 --- a/docs/src/config/request-specifics.md +++ b/docs/src/config/request-specifics.md @@ -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 diff --git a/src/cache/cache.ts b/src/cache/cache.ts index c98d9b9..4d78ae6 100644 --- a/src/cache/cache.ts +++ b/src/cache/cache.ts @@ -164,7 +164,8 @@ export type CacheProperties = { * 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