Get the directory where an artifact for a URL should be cached. Args: cache_dir: Base cache directory url: URL being cached Returns: Path to the artifact directory
(cache_dir: Path, url: str)
| 168 | |
| 169 | |
| 170 | def get_cache_artifact_dir(cache_dir: Path, url: str) -> Path: |
| 171 | """ |
| 172 | Get the directory where an artifact for a URL should be cached. |
| 173 | |
| 174 | Args: |
| 175 | cache_dir: Base cache directory |
| 176 | url: URL being cached |
| 177 | |
| 178 | Returns: |
| 179 | Path to the artifact directory |
| 180 | """ |
| 181 | cache_key = str(sanitize_url_for_path(url)) |
| 182 | return cache_dir / cache_key |
| 183 | |
| 184 | |
| 185 | def check_cached_download( |
no test coverage detected