MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / clear_cache

Function clear_cache

nodedb/src/engine/timeseries/last_value_cache.rs:203–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201
202 #[test]
203 fn clear_cache() {
204 let mut cache = LastValueCache::new();
205 cache.update(sid(1), 100, 1.0);
206 cache.update(sid(2), 200, 2.0);
207 cache.clear();
208 assert!(cache.is_empty());
209 }
210
211 #[test]
212 fn nonexistent_series() {

Callers

nothing calls this directly

Calls 3

sidFunction · 0.85
updateMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected