(cache_path)
| 59 | return os.path.exists(cache_path) |
| 60 | |
| 61 | def _get(cache_path): |
| 62 | try: |
| 63 | return read_json(cache_path) |
| 64 | except (JSONDecodeError, FileNotFoundError): |
| 65 | # These are files which are corrupted, likely as user paused when files were being written. |
| 66 | _remove(cache_path) |
| 67 | raise CacheMissException(cache_path) |
| 68 | |
| 69 | def safe_get(cache_path): |
| 70 | try: |
no test coverage detected