Metastatic. Cache. ETS
(Metastatic v0.33.0)
View Source
ETS implementation of Metastatic.Cache.
Uses a public ETS table for high-performance in-memory caching.
Eviction
When the table reaches @max_entries, the oldest @evict_batch
entries (by insertion timestamp) are removed in one pass. This avoids the
historical cliff where the entire table was wiped at once, which caused a
latency spike and a cold-cache thundering herd.
Versioning
Cache keys include a version tag. Bump @cache_version whenever a parser
or abstraction change makes previously cached MetaAST stale; old entries
then simply miss and are re-populated.