Create a multi-cache fallback manager.
File system adapter
Cache directory names in priority order (first = primary)
OptionalbaseConfig: Partial<CacheConfig>Base cache configuration (merged with per-cache settings)
Clear all caches (all directories).
Use with caution: This clears PRIMARY and ALL FALLBACK caches.
Get all cache managers (for advanced operations).
Cache manager for the directory.
Cache directory name.
Get cache statistics for ALL caches (primary + fallbacks).
Useful for debugging and understanding overall cache usage.
Array of cache stats with cache names
Cache directory name.
Statistics of that cache.
Get cached analysis result from any cache (primary or fallbacks).
Search Strategy:
Performance:
File path to look up
Cached result with source cache name, or null if not found in any cache
Get primary cache manager (for direct access if needed).
Get cache statistics for PRIMARY cache only.
Why primary only?
Cache statistics for primary cache
Initialize all cache managers.
Invalidate cache for a file (invalidates in ALL caches).
Why invalidate all caches?
File path to invalidate
Optionaltype: "analysis" | "ast"Cache type to invalidate (default: both ast and analysis)
Cache analysis results (writes to PRIMARY cache only).
Write Strategy:
Why primary-only writes?
File path to cache
Analysis results to cache
File dependencies (for invalidation)
Multi-cache fallback manager that checks multiple cache directories in order.
Wraps several CacheManager instances. Used by scan-all to read the results of the individual tool caches (solid, angular, architecture) when its own directory has no entry, so scan-all after individual scans does not analyze those files again.
Architecture:
Cache Read Strategy:
Cache Write Strategy:
Example