/** * File system cache implementation that implements the CacheInterface. * Provides `match` and `put` methods compatible with the Web Cache API. */ export class FileCache { /** * Instantiate a `FileCache` object. * @param {string} path */ constructor(path: string); path: string; /** * Translate cache identity to storage layout. Versioned keys are stored at the * same path as unversioned ones, so the cache keeps the layout of the repo; the * version lives in a marker file next to the cached file (no marker = version 0). * * Releases before versioning don't know about markers. If one shares this folder * and deletes and re-downloads a versioned file, the old marker stays and the * re-downloaded file counts as current. That case is rare, so it is accepted. * @private * @param {string} request * @returns {{ filePath: string, markerPath: string, version: number }} */ private resolve; /** * Whether two logical keys alias the same physical entry (FileCache-only cleanup detail). * @param {string} request * @param {string} other * @returns {boolean} * @internal */ isSameFile(request: string, other: string): boolean; /** * @private * @param {string} markerPath * @returns {Promise} */ private readVersion; /** * Checks whether the given request is in the cache. * @param {string} request * @returns {Promise} */ match(request: string): Promise; /** * Adds the given response to the cache. * @param {string} request * @param {Response} response * @param {(data: {progress: number, loaded: number, total: number}) => void} [progress_callback] Optional. * The function to call with progress updates * @returns {Promise} */ put(request: string, response: Response, progress_callback?: (data: { progress: number; loaded: number; total: number; }) => void): Promise; /** * Deletes the cache entry for the given request. * @param {string} request * @returns {Promise} A Promise that resolves to `true` if the cache entry was deleted, `false` otherwise. */ delete(request: string): Promise; } import { FileResponse } from '../hub/FileResponse.js'; //# sourceMappingURL=FileCache.d.ts.map