pub struct InMemoryPipelineCache { /* private fields */ }Expand description
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).
Implementations§
Source§impl InMemoryPipelineCache
impl InMemoryPipelineCache
Sourcepub fn with_limits(
max_entries_per_shard: usize,
max_bytes_per_shard: usize,
) -> Self
pub fn with_limits( max_entries_per_shard: usize, max_bytes_per_shard: usize, ) -> Self
Construct an empty cache with explicit per-shard entry and byte budgets.
A zero entry budget or zero byte budget creates a disabled cache that
accepts put calls but retains no artifacts.
Sourcepub fn cached_bytes(&self) -> usize
pub fn cached_bytes(&self) -> usize
Current cached artifact bytes. Thread-safe snapshot.
Sourcepub fn eviction_reports(&self) -> Vec<InMemoryEvictionReport>
pub fn eviction_reports(&self) -> Vec<InMemoryEvictionReport>
Snapshot the most recent eviction report from every shard that has evicted at least one artifact.
Trait Implementations§
Source§impl Debug for InMemoryPipelineCache
impl Debug for InMemoryPipelineCache
Source§impl Default for InMemoryPipelineCache
impl Default for InMemoryPipelineCache
Source§impl PipelineCacheStore for InMemoryPipelineCache
impl PipelineCacheStore for InMemoryPipelineCache
Source§fn get_arc(&self, fp: &PipelineFingerprint) -> Option<Arc<Vec<u8>>>
fn get_arc(&self, fp: &PipelineFingerprint) -> Option<Arc<Vec<u8>>>
V7-PERF-009: zero-clone hot-path lookup. The cache already stores
payloads behind Arc<Vec<u8>>, so a hit is one refcount bump.
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 InMemoryPipelineCache
impl RefUnwindSafe for InMemoryPipelineCache
impl Send for InMemoryPipelineCache
impl Sync for InMemoryPipelineCache
impl Unpin for InMemoryPipelineCache
impl UnsafeUnpin for InMemoryPipelineCache
impl UnwindSafe for InMemoryPipelineCache
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