MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new

Method new

atomic-repository/src/changestore/cache.rs:41–47  ·  view source on GitHub ↗

Create a new LRU cache with the given capacity. # Arguments `capacity` - Maximum number of entries to store

(capacity: usize)

Source from the content-addressed store, hash-verified

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 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected