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

Method _evict_expired

uncommon_route/session.py:102–108  ·  view source on GitHub ↗
(self, now: float)

Source from the content-addressed store, hash-verified

100 self._evict_over_capacity()
101
102 def _evict_expired(self, now: float) -> None:
103 cutoff = now - self._ttl
104 stale_ids = [
105 sid for sid, rec in self._records.items() if rec.last_seen_ts < cutoff
106 ]
107 for sid in stale_ids:
108 self._drop(sid)
109
110 def _evict_over_capacity(self) -> None:
111 while len(self._records) > self._capacity:

Callers 2

evict_expiredMethod · 0.95
upsertMethod · 0.95

Calls 1

_dropMethod · 0.95

Tested by

no test coverage detected