Skip to main content

Module cache

Module cache 

Source
Expand description

Section Cache System

Provides caching for static sections to:

  • Reduce token costs (cached content not re-computed)
  • Enable prompt prefix caching for API efficiency
  • Track cache statistics for optimization

Structs§

CacheKey
Cache key for a section
CacheStats
Cache statistics
CachedEntry
Cached entry with metadata
SectionCache
Section cache with statistics

Functions§

clear_global_cache
Clear the global cache (for /clear, /compact, worktree switch)
estimate_tokens
Estimate token count for content
global_cache
Get the global section cache