MCPcopy
hub / github.com/MinishLab/semble / _compute_cache_key

Method _compute_cache_key

src/semble/mcp.py:184–187  ·  view source on GitHub ↗

Compute the canonical cache key for a source.

(self, source: str, ref: str | None = None)

Source from the content-addressed store, hash-verified

182 return self._model_path
183
184 def _compute_cache_key(self, source: str, ref: str | None = None) -> str:
185 """Compute the canonical cache key for a source."""
186 is_git = is_git_url(source)
187 return (f"{source}@{ref}" if ref else source) if is_git else str(Path(source).resolve())
188
189 def _build_and_cache_index(self, source: str, ref: str | None, model_path: str, cache_key: str) -> SembleIndex:
190 """Build an index for the given source and cache it."""

Callers 3

evictMethod · 0.95
getMethod · 0.95

Calls 1

is_git_urlFunction · 0.90

Tested by 1