Expand description
Content-aware cache sizing with intelligent memory management.
This module provides adaptive cache sizing based on content characteristics, access patterns, and system resource availability.
§Example
use chie_core::content_aware_cache::{ContentAwareCache, CacheContentMetrics, ContentType};
let mut cache = ContentAwareCache::new(100 * 1024 * 1024); // 100MB
// Add content with metrics
let metrics = CacheContentMetrics {
content_type: ContentType::VideoChunk,
size_bytes: 256 * 1024,
access_frequency: 10,
priority: 5,
};
cache.insert("video:chunk1".to_string(), vec![0u8; 256 * 1024], metrics);
// Cache automatically adjusts size based on content characteristics
println!("Current cache size: {} bytes", cache.current_size());Structs§
- Cache
Content Metrics - Metrics for content-aware caching decisions.
- Content
Aware Cache - Content-aware cache with intelligent sizing.
- Content
Cache Stats - Cache statistics.
Enums§
- Content
Type - Content type classification for cache sizing.