Incremental compiler that caches source compilations
new
IncrementalCompiler(options?: IncrementalCompilerOptions)
Creates a new IncrementalCompiler
private
readonly
cache: ICacheStorage
private
readonly
compiler: FilterCompiler
private
readonly
forceRefresh: Set<string>
private
readonly
maxCacheAge: number
clearCache(): Promise<void>
Clears the compilation cache
compile(configuration: IConfiguration): Promise<string[]>
Compiles a filter list with incremental compilation support
private
compileSource(source: ISource): Promise<string[]>
Compiles a single source
compileWithMetrics(configuration: IConfiguration,benchmark?: boolean,): Promise<IncrementalCompilationResult>
Compiles with metrics and incremental compilation support
private
getCacheKey(source: ISource): string
Generates cache key for a source
getCacheStats(): Promise<{ entries: number; sources: string[]; totalRules: number; oldestEntry: number; newestEntry: number; }>
Gets cache statistics
private
hashContent(rules: string[]): Promise<string>
Hashes content for comparison
private
shouldRecompile(source: ISource,cached: SourceCacheEntry,): boolean
Determines if a source should be recompiled