Skip to main content

Module cache_management

Module cache_management 

Source
Expand description

KV Cache management system for efficient context preservation and retrieval

Re-exports§

pub use cache_bridge::CacheContextBridge;
pub use cache_bridge::CacheBridgeStats;
pub use cache_bridge::CacheTransition;
pub use cache_bridge::TransitionType;
pub use cache_config::KVCacheConfig;
pub use cache_config::RetrievalStrategy;
pub use cache_config::SnapshotStrategy;
pub use cache_config::CachePreservationConfig;
pub use cache_extractor::CacheExtractor;
pub use cache_extractor::CacheExtractorConfig;
pub use cache_extractor::ExtractedCacheEntry;
pub use cache_extractor::CacheEntryType;
pub use cache_extractor::KVEntry;
pub use cache_manager::KVCacheManager;
pub use cache_manager::SessionCacheState;
pub use cache_manager::CacheStatistics;
pub use cache_manager::CacheOperation;
pub use cache_manager::CacheOperationType;
pub use cache_manager::ClearReason;
pub use cache_manager::CacheClearResult;
pub use cache_manager::RetrievalResult;
pub use cache_manager::RetrievedEntry;
pub use cache_manager::CacheProcessingResult;
pub use cache_manager::CacheStatisticsExport;
pub use cache_manager::MaintenanceResult;
pub use cache_scorer::CacheEntryScorer;
pub use cache_scorer::CacheScoringConfig;
pub use llama_cache_interface::LlamaKVCacheInterface;
pub use llama_cache_interface::LlamaKVCacheState;

Modules§

cache_bridge
Creates smooth transitions between cached and retrieved content
cache_config
Configuration for the KV cache management system
cache_extractor
Extracts and preserves important KV cache entries
cache_manager
Main KV cache management engine
cache_scorer
Scores the importance of KV cache entries for retention and retrieval
llama_cache_interface
Interface to llama.cpp’s attention KV cache for infinite context management

Functions§

create_default_cache_manager
Create a default KV cache manager. Pass llm_worker to enable pre-clear summarization.