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

Method touch

nodedb/src/control/security/sessions/registry.rs:245–251  ·  view source on GitHub ↗

Update last-active timestamp (called at each request boundary).

(&self, session_id: &str)

Source from the content-addressed store, hash-verified

243
244 /// Update last-active timestamp (called at each request boundary).
245 pub fn touch(&self, session_id: &str) {
246 let now = now_secs();
247 let sessions = self.sessions.read().unwrap_or_else(|p| p.into_inner());
248 if let Some(s) = sessions.get(session_id) {
249 s.last_active.store(now, Ordering::Relaxed);
250 }
251 }
252
253 /// Update last-active timestamp and increment byte counters.
254 pub fn touch_with_bytes(&self, session_id: &str, bytes_in_delta: u64, bytes_out_delta: u64) {

Callers

nothing calls this directly

Calls 4

now_secsFunction · 0.50
readMethod · 0.45
getMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected