UNPKG

453 BTypeScriptView Raw
1import { CachedResponse } from './CachedResponse';
2interface ICache {
3 getResponse(url: string, cb: (err: Error | null, response: CachedResponse | null) => void): void;
4 setResponse(url: string, response: CachedResponse | null): void;
5 updateResponseHeaders?: (url: string, response: Pick<CachedResponse, 'headers' | 'requestTimestamp'>) => void;
6 invalidateResponse(url: string, cb: (err: Error | null) => void): void;
7}
8export { ICache };