MCPcopy Create free account
hub / github.com/github/spec-kit / _get_cache_paths

Method _get_cache_paths

src/specify_cli/workflows/catalog.py:911–916  ·  view source on GitHub ↗

Get cache file paths for a URL (hash-based).

(self, url: str)

Source from the content-addressed store, hash-verified

909 # -- Caching ----------------------------------------------------------
910
911 def _get_cache_paths(self, url: str) -> tuple[Path, Path]:
912 """Get cache file paths for a URL (hash-based)."""
913 url_hash = hashlib.sha256(url.encode()).hexdigest()[:16]
914 cache_file = self.cache_dir / f"step-catalog-{url_hash}.json"
915 meta_file = self.cache_dir / f"step-catalog-{url_hash}-meta.json"
916 return cache_file, meta_file
917
918 def _is_url_cache_valid(self, url: str) -> bool:
919 """Check if cached data for a URL is still fresh."""

Callers 2

_is_url_cache_validMethod · 0.95
_fetch_single_catalogMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected