{# Object-store cache panel. Page-level rather than per-backend: the store is shared global config, and a backend is only the SSH vantage point the listing runs from (the store is reachable cluster-side by design). Polls itself while a scan is in flight, same as the per-backend cards. #}

Result cache

{% if c.configured %} {{ c.cache.tool }} {% else %} disabled {% endif %}
{% if c.configured %}
{% if c.vantage_backends %}
{% if c.vantage_backends|length > 1 %} {# Any backend gives the same answer; it is only the vantage point. #} {% else %} {% endif %}
{% endif %}
{% endif %}
{% if c.configured %}

{{ c.cache.store }}

{% endif %} {% if c.error %}
{{ c.error }}
{% endif %} {% if not c.configured %}

No result cache configured. Tasks that declare inputs and outputs can reuse a previous run's artifacts instead of recomputing them — set cache.enabled and cache.store in Settings.

{% elif not c.vantage_backends %}

No connected SSH backend to list the store from. Hashing and artifact transfer run cluster-side, so the store is read through a Slurm or PBS backend — never from this host.

{% elif not c.status %}

Not scanned yet. A scan runs two listings against the store and reports back in seconds.

{% elif c.status.error %}

Could not read the store.

{{ c.status.error }}

The backend needs {{ c.status.tool }} on its PATH and credentials for the store.

{% else %}
{{ c.status.blob_bytes | disk_bytes }}
Artifacts stored
{{ c.status.actions if c.status.actions is not none else '—' }}
Cached actions
{{ c.status.blobs if c.status.blobs is not none else '—' }}
Distinct blobs
{% if c.status.mean_blob_bytes %}{{ c.status.mean_blob_bytes | disk_bytes }}{% else %}—{% endif %}
Mean blob size
{# Fewer blobs than actions is the normal, healthy case: several actions resolving to identical outputs share one blob. Worth naming, since the two numbers looking "wrong" otherwise invites a bug report. #} {% if c.status.actions and c.status.blobs and c.status.blobs < c.status.actions %}

{{ c.status.actions - c.status.blobs }} action{{ '' if c.status.actions - c.status.blobs == 1 else 's' }} resolved to artifacts that were already stored — deduplication the content-addressed layer gets for free.

{% endif %}
scanned {{ c.status.scanned_at | age }} {% if c.status.backend %}via {{ c.status.backend }}{% endif %} {{ c.status.duration_ms }}ms {% for p in c.status.prefixes %} {{ p.name }}/ {% if p.error %}error{% else %}{{ p.objects }} obj · {{ p.size_bytes | disk_bytes }}{% endif %} {% endfor %}
{# Nothing here reclaims space: identifying blobs no manifest points at needs a read of every ac/ entry, which this deliberately does not do. #}

Sizes only — this does not identify reclaimable space, which would need reading every action manifest.

{% endif %}