Skip to main content

Module pipeline_cache

Module pipeline_cache 

Source
Expand description

Content-addressed pipeline cache: blake3(canonicalize(p).to_wire()) is the cache key. P4.3 - content-addressed pipeline cache.

Every compiled Program has a stable fingerprint = blake3(canonicalize(program).to_wire()). The fingerprint becomes the cache key: two authors who write the same computation via different spellings share cached target binaries / native-backend artifacts, skipping recompilation.

The cache is deliberately composable at this layer. Hot paths use InMemoryPipelineCache, persistent process-restart reuse uses DiskCache, and callers that want both compose them with LayeredPipelineCache.

Structs§

DiskCache
Disk-backed pipeline cache. Writes one file per fingerprint under <root>/<hex>.bin. Reads are stateless; writes are write + rename for atomicity. No eviction policy today (user decides) - the footprint is bounded by sum(artifact_size × unique_canonical_programs).
DiskCacheDurabilityReport
Crash-durability evidence for disk cache artifacts.
InMemoryEvictionReport
Structured eviction report for one in-memory cache shard.
InMemoryPipelineCache
In-memory pipeline cache - zero-persistence, zero-network, sharded FxHashMaps behind mutexes so concurrent get/put on different fingerprints rarely contend (VYRE_RUNTIME / PERF hot-cache audit).
LayeredPipelineCache
Composite store that reads from every backend and writes to the first. Lets callers compose [RamStore, DiskStore, RemoteStore] so a miss at the fast layer falls through to slower layers.
LayeredPromotionReport
Layered-cache promotion evidence.
PipelineCacheMetricError
Pipeline-cache metric arithmetic failure.
PipelineCacheMetrics
Pipeline-cache instrumentation counters.
PipelineFingerprint
The blake3 fingerprint of a canonicalized Program. 32 bytes so collisions are cryptographically impossible for our scale.
RemoteCache
HTTPS-backed cache that reads pre-compiled artifacts from a base URL. Feature-gated on remote-cache so library users who only want disk caching don’t pull in ureq.

Enums§

DiskCacheError
Errors from disk-backed pipeline cache construction / use.
InMemoryEvictionReason
Reason the in-memory pipeline cache evicted retained artifacts.

Traits§

PipelineCacheStore
Trait for persistent pipeline-cache backends. super::DiskCache and super::RemoteCache (when the remote feature is enabled) ship disk- and network-backed implementations; tests here use the in-memory super::InMemoryPipelineCache.

Type Aliases§

PersistentPipelineCacheStore
Alias for the disk-backed pipeline cache store.