UNPKG

495 BTypeScriptView Raw
1import { CachedResponse } from './CachedResponse';
2export default class MemoryCache {
3 private readonly _cache;
4 getResponse(url: string, callback: (err: null | Error, response: null | CachedResponse) => void): void;
5 updateResponseHeaders(url: string, response: Pick<CachedResponse, 'headers' | 'requestTimestamp'>): void;
6 setResponse(url: string, response: CachedResponse): void;
7 invalidateResponse(url: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
8}