Clear the catalog cache (both legacy and URL-hash-based files).
(self)
| 2640 | raise ExtensionError(f"Failed to save extension ZIP: {e}") |
| 2641 | |
| 2642 | def clear_cache(self): |
| 2643 | """Clear the catalog cache (both legacy and URL-hash-based files).""" |
| 2644 | if self.cache_file.exists(): |
| 2645 | self.cache_file.unlink() |
| 2646 | if self.cache_metadata_file.exists(): |
| 2647 | self.cache_metadata_file.unlink() |
| 2648 | # Also clear any per-URL hash-based cache files |
| 2649 | if self.cache_dir.exists(): |
| 2650 | for extra_cache in self.cache_dir.glob("catalog-*.json"): |
| 2651 | if extra_cache != self.cache_file: |
| 2652 | extra_cache.unlink(missing_ok=True) |
| 2653 | for extra_meta in self.cache_dir.glob("catalog-*-metadata.json"): |
| 2654 | extra_meta.unlink(missing_ok=True) |
| 2655 | |
| 2656 | |
| 2657 | class ConfigManager: |
no outgoing calls