UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

30 lines (29 loc) 874 B
/** * A per-directory fingerprint cache backed by a JSON file on disk. * * Each fingerprinted directory gets its own cache file in ~/.cdk/cache/fingerprints/. * Entries map file metadata (inode+mtime+size) to content fingerprints. */ export declare class FingerprintDiskCache { private cache; private dirty; private cacheFile; /** * Create a FingerprintDiskCache * * The `directoryPath` argument is expected to be pre-resolved to an absolute path. */ constructor(directoryPath: string); /** * Look up a cached fingerprint or compute it. */ obtain(cacheKey: string, calcFn: () => string): string; /** * Persist the cache to disk. */ save(): void; private _load; private _evict; /** Remove oldest cache files if the directory exceeds MAX_CACHE_FILES */ private _evictCacheDir; }