mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
style: formatted code
This commit is contained in:
parent
c7dab4fa57
commit
0cca290f0b
2
src/cache/cache.ts
vendored
2
src/cache/cache.ts
vendored
@ -165,7 +165,7 @@ export type CacheProperties<R = unknown, D = unknown> = {
|
||||
*
|
||||
* - `number` -> the max time (in seconds) that the cache can be reused.
|
||||
* - `boolean` -> `false` disables and `true` enables with infinite time if no value is
|
||||
* present on `stale-if-error` in Cache-Control.
|
||||
* present on `stale-if-error` in Cache-Control.
|
||||
* - `function` -> a predicate that can return `number` or `boolean` as described above.
|
||||
*
|
||||
* @default true
|
||||
|
||||
@ -2,6 +2,7 @@ import type { CacheAxiosResponse } from '../cache/axios';
|
||||
|
||||
/**
|
||||
* The possible values are:
|
||||
*
|
||||
* - `'dont cache'`: the request will not be cached.
|
||||
* - `'not enough headers'`: the request will find other ways to determine the TTL value.
|
||||
* - `number`: used as the TTL value.
|
||||
|
||||
@ -32,13 +32,13 @@ declare const structuredClone: (<T>(value: T) => T) | undefined;
|
||||
*
|
||||
* @param {boolean} cloneData If the data returned by `find()` should be cloned to avoid
|
||||
* mutating the original data outside the `set()` method.
|
||||
*
|
||||
* @param {number | false} cleanupInterval The interval in milliseconds to run a
|
||||
* setInterval job of cleaning old entries. If false, the job will not be created. Disabled is default
|
||||
*
|
||||
* @param {number | false} maxEntries The maximum number of entries to keep in the storage. Its hard to
|
||||
* determine the size of the entries, so a smart FIFO order is used to determine eviction. If false,
|
||||
* no check will be done and you may grow up memory usage. Disabled is default
|
||||
* setInterval job of cleaning old entries. If false, the job will not be created.
|
||||
* Disabled is default
|
||||
* @param {number | false} maxEntries The maximum number of entries to keep in the
|
||||
* storage. Its hard to determine the size of the entries, so a smart FIFO order is used
|
||||
* to determine eviction. If false, no check will be done and you may grow up memory
|
||||
* usage. Disabled is default
|
||||
*/
|
||||
export function buildMemoryStorage(
|
||||
cloneData = false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user