(cache: diskcache.Cache)
| 1222 | |
| 1223 | def _get_cache_info(config: ClientConfig) -> dict[str, list[dict]]: |
| 1224 | def _stats(cache: diskcache.Cache) -> dict: |
| 1225 | return { |
| 1226 | 'count': len(cache), |
| 1227 | 'size': cache.volume(), |
| 1228 | } |
| 1229 | |
| 1230 | def _cache(path: Path) -> dict: |
| 1231 | with diskcache.Cache(disk=diskcache.JSONDisk, directory=path) as cache: |