import LruCache from 'lru-cache' ; internal export interface IFileHashCache { get ( key ) : Promise < string > | undefined ; set ( key , value ) : void ; del ( key ) : void ; } internal export class FileHashCache implements IFileHashCache { private lru : LruCache < string , Promise < string > > ; constructor ( maxSize = 250 ) { this . lru = new LruCache ( maxSize ) ; } get ( key ) { return this . lru . get ( key ) ; } set ( key , value ) { this . lru . set ( key , value ) ; } del ( key ) { this . lru . del ( key ) ; } }