MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / remove_lru

Method remove_lru

graphlite/src/cache/result_cache.rs:128–136  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

126 }
127
128 fn remove_lru(&mut self) -> Option<K> {
129 if let Some(key) = self.order.pop_back() {
130 self.positions.remove(&key);
131 self.update_positions();
132 Some(key)
133 } else {
134 None
135 }
136 }
137
138 fn update_positions(&mut self) {
139 self.positions.clear();

Callers 2

evict_l1_if_neededMethod · 0.80
evict_l2_if_neededMethod · 0.80

Calls 2

update_positionsMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected