MCPcopy Create free account
hub / github.com/GuDaStudio/GrokSearch / set

Method set

src/grok_search/sources.py:38–43  ·  view source on GitHub ↗
(self, session_id: str, sources: list[dict])

Source from the content-addressed store, hash-verified

36 self._cache: OrderedDict[str, list[dict]] = OrderedDict()
37
38 async def set(self, session_id: str, sources: list[dict]) -> None:
39 async with self._lock:
40 self._cache[session_id] = sources
41 self._cache.move_to_end(session_id)
42 while len(self._cache) > self._max_size:
43 self._cache.popitem(last=False)
44
45 async def get(self, session_id: str) -> list[dict] | None:
46 async with self._lock:

Callers 1

web_searchFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected