Skip to main content

Module mesh_swarm_cache

Module mesh_swarm_cache 

Source
Expand description

Artifact cache with pinned and evictable entries (ADR-099 section 6, card mesh-placement-25).

The cache accounts for verified artifacts held by an ArtifactExchange against a byte budget. When the unpinned entries push the total over budget, the least recently used unpinned entries are evicted (their bytes freed, artifact.evict chained) until it fits. A pinned entry is never evicted by the policy: that is how a node keeps the packages and model weights it is running. Pins can push the cache over budget; ArtifactCache::over_budget reports it.

“Used” means admitted, fetched, or served to a peer, so artifacts the swarm keeps asking this node for stay.

Structs§

ArtifactCache
Budgeted, pin-aware view of the verified artifacts of one exchange.
CacheConfig
Cache budget.
CacheEntryInfo
One cache entry as reported.

Enums§

ArtifactKind
What an entry is, for advertisement.
CacheError
Why the cache refused something.