- Preparing search index...
- The search index is not available
wretch
Type alias ThrottlingCacheMiddleware
Throttling
Cache
Middleware
: ((options
?: ThrottlingCacheOptions) => ConfiguredMiddleware & { cache
: Map<any, any>; inflight
: Map<any, any>; throttling
: Set<unknown>; cacheResponse
(key
: any, response
: any): void; })
Type declaration
-
- (options?: ThrottlingCacheOptions): ConfiguredMiddleware & {
cache: Map<any, any>;
inflight: Map<any, any>;
throttling: Set<unknown>;
cacheResponse(key: any, response: any): void;
}
-
Returns ConfiguredMiddleware & {
cache: Map<any, any>;
inflight: Map<any, any>;
throttling: Set<unknown>;
cacheResponse(key: any, response: any): void;
}
Throttling cache middleware
A throttling cache which stores and serves server responses for a certain amount of time.
Options
milliseconds
(url, opts) => boolean
(url, opts) => string
(url, opts) => boolean
(url, opts) => string | RegExp | null
response => boolean
string