Crate rez_next_cache

Crate rez_next_cache 

Source
Expand description

Intelligent caching system for rez-core

This crate provides a unified, intelligent caching system that integrates with existing rez-core caches (SolverCache, RepositoryCache, RexCache). It features multi-level caching, predictive preheating, and adaptive tuning to achieve >90% cache hit rates.

§Features

  • Unified Cache Interface: Common trait for all cache types
  • Multi-level Caching: L1 memory cache + L2 disk cache
  • Predictive Preheating: ML-based access pattern prediction
  • Adaptive Tuning: Real-time parameter optimization
  • Performance Monitoring: Comprehensive statistics and metrics

§Architecture

The caching system is built on top of existing rez-core cache implementations, reusing proven patterns and components while adding intelligent features.

┌─────────────────────────────────────────────────────────────┐
│                IntelligentCacheManager                     │
├─────────────────────────────────────────────────────────────┤
│  L1 Cache (DashMap)  │  L2 Cache (RepositoryCache)        │
├─────────────────────────────────────────────────────────────┤
│  PredictivePreheater │  AdaptiveTuner                     │
├─────────────────────────────────────────────────────────────┤
│  SolverCache  │  RepositoryCache  │  RexCache             │
└─────────────────────────────────────────────────────────────┘

Re-exports§

pub use adaptive_tuner::*;
pub use benchmarks::*;
pub use cache_config::*;
pub use cache_stats::*;
pub use error::*;
pub use intelligent_manager::*;
pub use performance_monitor::*;
pub use predictive_preheater::*;
pub use unified_cache::*;

Modules§

adaptive_tuner
Adaptive Cache Tuner
benchmarks
Intelligent Cache Benchmarks
cache_config
Cache configuration and settings
cache_stats
Unified cache statistics and monitoring
error
Error types for the intelligent caching system
intelligent_manager
Intelligent Cache Manager
performance_monitor
Performance Monitor
predictive_preheater
Predictive Preheater
unified_cache
Unified cache interface and implementations

Enums§

EvictionStrategy
Cache eviction strategies (copied from SolverCache for now)

Constants§

CACHE_VERSION
Version information for the cache system
DEFAULT_L1_CAPACITY
Default cache configuration
DEFAULT_L2_CAPACITY
DEFAULT_MEMORY_LIMIT_MB
DEFAULT_TTL_SECONDS