MCPcopy Create free account
hub / github.com/Pometry/Raphtory / remove

Method remove

raphtory-graphql/src/cache.rs:123–135  ·  view source on GitHub ↗

remove a graph from the cache, locking the cache entry until the graph is dropped

(&self, key: &str)

Source from the content-addressed store, hash-verified

121
122 /// remove a graph from the cache, locking the cache entry until the graph is dropped
123 pub async fn remove(&self, key: &str) {
124 let res = self
125 .cache
126 .entry_async(key, |_, _| EntryAction::<()>::ReplaceWithGuard)
127 .await;
128
129 match res {
130 EntryResult::Replaced(_guard, graph) => {
131 blocking_compute(move || flush_graph(graph)).await;
132 }
133 _ => {}
134 }
135 }
136
137 /// Insert a new item into the cache, replacing an existing item if it exists
138 /// The closure to create the new graph is invoked while holding a guard for the cache key

Callers 7

queryMethod · 0.45
upload_graphMethod · 0.45
loadMethod · 0.45
loadMethod · 0.45
initMethod · 0.45
download_dataFunction · 0.45
start_dockerMethod · 0.45

Calls 2

blocking_computeFunction · 0.85
flush_graphFunction · 0.85

Tested by

no test coverage detected