Show information about the cache.
(*, config_file, profile, output)
| 1283 | @config_file_options() |
| 1284 | @standardized_output |
| 1285 | def cache_info(*, config_file, profile, output): |
| 1286 | """Show information about the cache.""" |
| 1287 | |
| 1288 | config = validate_config_v1(load_config(config_file=config_file, profile=profile)) |
| 1289 | info = _get_cache_info(config) |
| 1290 | |
| 1291 | for name, collection in info.items(): |
| 1292 | output(f"{name}:") |
| 1293 | for stats in collection: |
| 1294 | output(f" - Path: {stats['path']}") |
| 1295 | output(f" Items: {stats['count']}") |
| 1296 | output(f" Size: {stats['size'] / 2**20:.2f} MiB") |
| 1297 | if not collection: |
| 1298 | output(" (empty)") |
| 1299 | |
| 1300 | |
| 1301 | @cache.command(name='purge') |
nothing calls this directly
no test coverage detected