MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / get_cached

Method get_cached

relay/request_cache.py:146–151  ·  view source on GitHub ↗

Get a cached response if it exists and is not expired

(self, request_id: str)

Source from the content-addressed store, hash-verified

144 del self._pending[request_id]
145
146 def get_cached(self, request_id: str) -> dict[str, Any] | None:
147 """Get a cached response if it exists and is not expired"""
148 entry = self._cache.get(request_id)
149 if entry and not entry.is_expired(self._ttl_seconds):
150 return entry.response
151 return None
152
153 def is_pending(self, request_id: str) -> bool:
154 """Check if a request is currently in-flight"""

Calls 2

is_expiredMethod · 0.80
getMethod · 0.45