Skip to main content

Crate mbx_cache_store

Crate mbx_cache_store 

Source
Expand description

Store inspection and garbage collection.

The store holds five trees: cas/v1 for content-addressed objects, action-results/v1 for the results that reference them, task-manifests/v1 for the prediction index, checkouts/v1 for the checkouts that have built each identity, and sessions/v1 for per-build event streams. Only the first two are collected for size; manifests are small and make cold builds fast, checkout records expire with their checkout claims, and session streams are bounded by age and count because they are history rather than cache content.

Structs§

GcOutcome
LargestEntry
ProjectUsage
RemoveProjectOutcome
StoreStats
VerifyOutcome

Functions§

checkout_is_live
Whether the checkout a record names is still on disk.
claim_sweep
Atomically stamp a due sweep before its callers perform coordinated GC.
gc
Evict objects until the store fits within max_bytes.
gc_dry_run
Describe the collection gc would perform without changing the store.
largest
Return the largest blobs and action-result records in descending order.
projects
Attribute cache and target bytes to each recorded workspace.
record_checkout
Record that workspace_root built identity.
remove_project
Remove checkout claims belonging to exactly one workspace.
stats
Summarize what the store currently holds.
sweep_if_due
Sweep the store if interval has passed since the last attempt.
verify
Verify every addressable CAS object and action-result record.