Skip to main content

Crate cache2

Crate cache2 

Source
Expand description

Bounded RAM + Region SSD cache.

Mutations provide process-local visibility. An unclean restart opens empty; Cache::close_warm publishes a recoverable image. See Error for failure classifications and handling policy.

Structs§

Cache
An open cache bound to one Tokio runtime.
CacheConfig
Complete, immutable configuration for opening a Cache.
CacheIndexSnapshot
Current L2 index occupancy and cumulative mutation diagnostics.
CacheIoDirectionSnapshot
Cumulative engine-request and runtime-file-I/O statistics for one direction.
CacheIoPathSnapshot
Cumulative runtime file activity for one I/O path.
CacheIoSnapshot
Cumulative I/O statistics split by direction.
CacheL1Snapshot
Current L1 occupancy and fixed metadata footprint.
CacheReclaimSnapshot
Cumulative work performed by Region reclamation.
CacheSnapshot
Point-in-time operational counters and cache-owned resource accounting.
CacheStatsSnapshot
Cumulative monitoring snapshot without metadata scans.
DetailedCacheSnapshot
On-demand operational detail across all cache tiers.
Error
Structured failure returned by a public C² operation.
FillControlSnapshot
Fill-pressure controller state and accounting.
FillLimits
Logical fill-rate ceilings shared by FillControlOptions::Observe and FillControlOptions::Adaptive.
IoLatencySnapshot
Fully observed engine durations for one role/result combination.
IoUringOptions
Pool topology for the experimental io_uring engine’s independent read, write, and reclaim pools.
IoUringPoolOptions
Ring count and aggregate execution bound for one pool of the experimental io_uring engine.
IoUringSqPollOptions
Kernel submission-queue polling parameters for the experimental io_uring engine.
LatencySnapshot
Cumulative observations for one population since open.
PosixIoOptions
Worker topology for POSIX positioned I/O.
RegionSnapshot
Current Region-store geometry, queue membership, and physical occupancy.
RequestStatsSnapshot
One allowed public-operation/result combination.
RuntimeOptions
Process-local runtime configuration checked together by CacheConfig::new.
StatsOptions
Statistics collection selected once per open.
StorageLayout
Immutable persistent geometry with a checked logical disk bound.
StorageOptions
Inputs for a persistent L2 layout, checked by Self::build.
Value
Owned cache value returned by Cache::get.

Enums§

CacheHealth
Current availability of the cache instance.
CacheTier
Storage tier that served a lookup.
ErrorKind
Stable, actionable classification for a C² failure.
ErrorOperation
Public operation during which a C² failure occurred.
FillControlOptions
Optional pre-timeout pressure observation and fill admission control.
FillPressure
Admission pressure, independent of terminal cache health.
IoEngineOptions
Engine selection and topology for the independent read, write, and reclaim I/O pools, validated by CacheConfig::new.
IoMode
Buffered/direct policy for runtime cache-record I/O.
IoOutcome
Terminal engine result, distinct from caller cancellation or timeout.
IoRole
Engine ownership, independent of buffered/direct file-operation accounting.
L1EvictionPolicy
Eviction policy for the process-local L1 tier.
LatencyMode
Duration collection for one timing scope, selected before its outcome is known.
ReadAdmission
Admission after an L2 index candidate has been selected.
RequestLatencyScope
Interval measured by a request duration distribution.
RequestOperation
Public operation whose terminal outcome is recorded.
RequestOutcome
Mutually exclusive terminal result; internal events may overlap these counts.
StartupMode
How the current cache instance obtained its initial state.

Constants§

LATENCY_BUCKET_UPPER_BOUNDS_NS
Explicit duration bucket upper bounds in nanoseconds, inclusive.