Create and register a cache with the global manager
(name: String)
| 458 | |
| 459 | /// Create and register a cache with the global manager |
| 460 | pub fn create_global_cache<K, V>(name: String) -> Arc<TtlCache<K, V>> |
| 461 | where |
| 462 | K: Eq + std::hash::Hash + Clone + Send + Sync + 'static, |
| 463 | V: Clone + Send + Sync + 'static, |
| 464 | { |
| 465 | global_cache_manager().create_and_register_cache(name) |
| 466 | } |
| 467 | |
| 468 | #[cfg(test)] |
| 469 | mod tests { |
nothing calls this directly
no test coverage detected