Skip to main content

Module ast_cache

Module ast_cache 

Source
Expand description

AST Cache for efficient multi-analysis

Provides a caching layer for parsed ASTs to prevent redundant parsing when running multiple sub-analyses on the same file (TIGER-03 mitigation).

§Usage

let mut cache = AstCache::new(100);
let tree = cache.get_or_parse(&path, &source)?;
// Tree is cached for subsequent calls

Structs§

AstCache
AST cache with LRU eviction
AstCacheKey
Cache key combining path and modification time
CacheStats
Cache statistics

Constants§

MAX_CACHE_SIZE
Maximum cache size (number of ASTs to cache)