MCPcopy Create free account
hub / github.com/acking-you/static_flow / touch

Method touch

crates/embedding/src/cache.rs:49–54  ·  view source on GitHub ↗
(&mut self, key: K)

Source from the content-addressed store, hash-verified

47 }
48
49 fn touch(&mut self, key: K) {
50 if let Some(pos) = self.order.iter().position(|existing| *existing == key) {
51 self.order.remove(pos);
52 }
53 self.order.push_back(key);
54 }
55
56 fn evict_lru(&mut self) {
57 while let Some(oldest) = self.order.pop_front() {

Callers 1

get_or_try_insert_mutMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected