MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / cache_info

Function cache_info

dwave/cloud/cli.py:1285–1298  ·  view source on GitHub ↗

Show information about the cache.

(*, config_file, profile, output)

Source from the content-addressed store, hash-verified

1283@config_file_options()
1284@standardized_output
1285def 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')

Callers

nothing calls this directly

Calls 4

validate_config_v1Function · 0.90
load_configFunction · 0.90
_get_cache_infoFunction · 0.85
outputFunction · 0.85

Tested by

no test coverage detected