Skip to main content

Module container_caches

Module container_caches 

Source
Expand description

A container agent’s cache volumes (a developer agent’s cargo registry and build output): how much they hold, and clearing them. Agents container_caches (POST /api/v1/agent/container/caches), and the window’s getcontainercaches / clearcontainercaches, which share view and clear. docs/specs/SPEC_CONTAINER_AGENT_DEVELOPER_IMAGE_2026_10_29.md section 5.

Clearing removes the agent’s container along with the volumes (a volume in use can’t go), so it waits for a turn to finish like an image update does; the next message starts a new container, which fills them again. A container agent can read its caches but not clear them: that is the host’s to do, like its limits.

Structs§

CachesRequest 🔒
POST /api/v1/agent/container/caches: Agents container_caches. Without clear it only reads.

Constants§

WARN_BYTES 🔒
Above this much in an agent’s caches its pane says so (20 GiB).

Statics§

WARNED 🔒
The containers whose pane has been told about large caches in this run of srv: one notice each.

Functions§

clear 🔒
Removes the agent’s cache volumes, and its container with them; answers with what is left (nothing) and what was freed.
first_warning 🔒
Whether this is the first time container_name is to be told about it (and records that it was).
forget_warning 🔒
Lets container_name be warned again, after its caches were cleared.
handle_container_caches 🔒
note_if_large 🔒
Writes one row in the pane, once per agent per run of srv, when the agent’s cache volumes hold WARN_BYTES or more. Docker’s disk-usage report can take a while with many volumes, so a start-up runs this in the background.
refuse 🔒
result_of 🔒
run 🔒
view 🔒
What the agent with uid uid holds in cache volumes now.