MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _mark_at_valid

Method _mark_at_valid

src/services/token_manager.py:107–108  ·  view source on GitHub ↗
(self, token_id: int, ttl_seconds: int = 300)

Source from the content-addressed store, hash-verified

105 self._at_validation_cache.pop(int(token_id), None)
106
107 def _mark_at_valid(self, token_id: int, ttl_seconds: int = 300) -> None:
108 self._at_validation_cache[int(token_id)] = time.monotonic() + max(30, int(ttl_seconds or 300))
109
110 def _has_recent_at_validation(self, token_id: int) -> bool:
111 expires_at = float(self._at_validation_cache.get(int(token_id), 0.0) or 0.0)

Callers 2

ensure_valid_tokenMethod · 0.95
_do_refresh_atMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected