Create a new LRU cache with the given capacity. # Arguments `capacity` - Maximum number of entries to store
(capacity: usize)
| 39 | /// |
| 40 | /// * `capacity` - Maximum number of entries to store |
| 41 | pub(crate) fn new(capacity: usize) -> Self { |
| 42 | Self { |
| 43 | entries: HashMap::with_capacity(capacity), |
| 44 | capacity, |
| 45 | access_counter: 0, |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | /// Get an entry from the cache, updating its access time. |
| 50 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected