pub struct LayeredPipelineCache { /* private fields */ }Expand description
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.
Implementations§
Source§impl LayeredPipelineCache
impl LayeredPipelineCache
Sourcepub fn new(layers: Vec<Arc<dyn PipelineCacheStore>>) -> Self
pub fn new(layers: Vec<Arc<dyn PipelineCacheStore>>) -> Self
Construct from an ordered list (fastest-first). Lookups consult every layer in order; writes land in the first layer only - downstream layers are expected to be populated independently (e.g., from a pre-compiled blob bundle).
Sourcepub fn promotion_report(&self) -> LayeredPromotionReport
pub fn promotion_report(&self) -> LayeredPromotionReport
Snapshot promotion evidence for lower-layer hits copied into faster preceding layers.
Trait Implementations§
Source§impl PipelineCacheStore for LayeredPipelineCache
impl PipelineCacheStore for LayeredPipelineCache
Source§fn get_arc(&self, fp: &PipelineFingerprint) -> Option<Arc<Vec<u8>>>
fn get_arc(&self, fp: &PipelineFingerprint) -> Option<Arc<Vec<u8>>>
V7-PERF-009: forward through to each layer’s zero-clone path so
the hit propagates without an intermediate Vec<u8> allocation.
Source§fn get(&self, fp: &PipelineFingerprint) -> Option<Vec<u8>>
fn get(&self, fp: &PipelineFingerprint) -> Option<Vec<u8>>
Look up a cached artifact for this fingerprint. Read more
Source§fn put(&self, fp: PipelineFingerprint, artifact: Vec<u8>)
fn put(&self, fp: PipelineFingerprint, artifact: Vec<u8>)
Insert a pre-compiled artifact. Implementations may dedupe
or evict per their own policy.
Source§fn metrics(&self) -> PipelineCacheMetrics
fn metrics(&self) -> PipelineCacheMetrics
Snapshot cache instrumentation for latency, throughput, and eviction
gates. Backends that do not maintain counters return zeros.
Auto Trait Implementations§
impl !Freeze for LayeredPipelineCache
impl !RefUnwindSafe for LayeredPipelineCache
impl !UnwindSafe for LayeredPipelineCache
impl Send for LayeredPipelineCache
impl Sync for LayeredPipelineCache
impl Unpin for LayeredPipelineCache
impl UnsafeUnpin for LayeredPipelineCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more