Get the global memory-aware cache manager
()
| 442 | |
| 443 | /// Get the global memory-aware cache manager |
| 444 | pub fn global_cache_manager() -> &'static MemoryAwareCacheManager { |
| 445 | GLOBAL_CACHE_MANAGER.get_or_init(|| { |
| 446 | let config = MemoryAwareCacheConfig::from_env(); |
| 447 | MemoryAwareCacheManager::with_config(config) |
| 448 | }) |
| 449 | } |
| 450 | |
| 451 | /// Register a cache with the global manager |
| 452 | pub fn register_global_cache<T>(name: String, cache: Arc<T>) |
no outgoing calls