uniqc.backend_cache module#
Disk cache for platform backend information.
Cache file layout#
~/.uniqc/cache/backends.jsonTop-level dict with one key per platform:
{ "originq": { "updated_at": "2026-04-28T12:00:00Z", "backends": [BackendInfo, ...] }, "quafu": { ... }, "ibm": { ... } }
Cache TTL#
Each platform entry is considered stale after 24 hours. The update()
function bypasses this check when called explicitly (uniqc backend update).
- uniqc.backend_cache.cache_info(cache_dir=None)[source]#
Return a human-readable summary of what’s in the cache.
Returns a dict mapping platform name to metadata (updated_at as a human-readable timestamp, is_stale bool, num_backends int).
- uniqc.backend_cache.get_cached_backends(platform, cache_dir=None)[source]#
Return the cached BackendInfo list for
platform, or an empty list.- Parameters:
- Return type:
- uniqc.backend_cache.invalidate(platform, cache_dir=None)[source]#
Remove the cached entry for
platform.
- uniqc.backend_cache.invalidate_all(cache_dir=None)[source]#
Clear the entire backend cache.
- Parameters:
cache_dir (Path | None)
- Return type:
None