(capacity: usize, ttl: Duration)
| 40 | } |
| 41 | |
| 42 | pub fn new_with_ttl(capacity: usize, ttl: Duration) -> Self { |
| 43 | Self { |
| 44 | cache: Arc::new(Mutex::new(LruCache::with_expiry_duration_and_capacity( |
| 45 | ttl, capacity, |
| 46 | ))), |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | pub fn insert(&self, key: K, value: V) { |
| 51 | self.with(|c| c.insert(key, value)); |
nothing calls this directly
no outgoing calls
no test coverage detected