MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / latest_interactive

Method latest_interactive

packages/server/src/api/routes.rs:176–190  ·  view source on GitHub ↗
(&self, udid: &str)

Source from the content-addressed store, hash-verified

174 }
175
176 fn latest_interactive(&self, udid: &str) -> Option<Value> {
177 let mut cache = self
178 .inner
179 .lock()
180 .unwrap_or_else(|poisoned| poisoned.into_inner());
181 let now = Instant::now();
182 cache.retain(|_, cached| {
183 now.duration_since(cached.cached_at) <= ACCESSIBILITY_TREE_CACHE_TTL
184 });
185 cache
186 .iter()
187 .filter(|(key, _)| key.udid == udid && key.interactive_only && !key.include_hidden)
188 .max_by_key(|(_, cached)| cached.cached_at)
189 .map(|(_, cached)| cached.snapshot.clone())
190 }
191
192 fn invalidate(&self, udid: &str) {
193 let mut generations = self

Callers 1

perform_tap_payloadFunction · 0.80

Calls 1

cloneMethod · 0.65

Tested by

no test coverage detected