Musique/node_modules/@derhuerst/http-basic/lib/MemoryCache.d.ts

9 lines
495 B
TypeScript
Raw Normal View History

2021-12-04 19:00:33 +00:00
import { CachedResponse } from './CachedResponse';
export default class MemoryCache {
private readonly _cache;
getResponse(url: string, callback: (err: null | Error, response: null | CachedResponse) => void): void;
updateResponseHeaders(url: string, response: Pick<CachedResponse, 'headers' | 'requestTimestamp'>): void;
setResponse(url: string, response: CachedResponse): void;
invalidateResponse(url: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
}