(incremental_cache_path: str = CACHE_PATH)
| 194 | |
| 195 | |
| 196 | def load_cache(incremental_cache_path: str = CACHE_PATH) -> JsonDict: |
| 197 | if os.path.exists(incremental_cache_path): |
| 198 | with open(incremental_cache_path) as stream: |
| 199 | cache = json.load(stream) |
| 200 | assert isinstance(cache, dict) |
| 201 | return cache |
| 202 | else: |
| 203 | return {} |
| 204 | |
| 205 | |
| 206 | def save_cache(cache: JsonDict, incremental_cache_path: str = CACHE_PATH) -> None: |