Get cache file paths for a URL (hash-based).
(self, url: str)
| 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.""" |
no outgoing calls
no test coverage detected