Type alias ThrottlingCacheMiddleware
ThrottlingCacheMiddleware: ((options?) => ConfiguredMiddleware & { cache: Map<any, any>; inflight: Map<any, any>; throttling: Set<unknown>; cacheResponse(key,
response) => void; }) Type declaration
- (options?): ConfiguredMiddleware & {
cache: Map<any, any>;
inflight: Map<any, any>;
throttling: Set<unknown>;
cacheResponse(key, response) => void;
} Returns ConfiguredMiddleware & {
cache: Map<any, any>;
inflight: Map<any, any>;
throttling: Set<unknown>;
cacheResponse(key, response) => 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