MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / evict_expired

Method evict_expired

uncommon_route/session.py:74–76  ·  view source on GitHub ↗

Eagerly evict stale records. Call before lookups to ensure TTL is respected.

(self, now: float)

Source from the content-addressed store, hash-verified

72 self._by_response_id[response_id] = session_id
73
74 def evict_expired(self, now: float) -> None:
75 """Eagerly evict stale records. Call before lookups to ensure TTL is respected."""
76 self._evict_expired(now)
77
78 def find_prefix_match(self, msg_hashes: tuple[str, ...]) -> _SessionRecord | None:
79 """Return the longest existing record whose msg_hashes is a (non-strict)

Callers 1

derive_session_id_v2Function · 0.80

Calls 1

_evict_expiredMethod · 0.95

Tested by

no test coverage detected