pub struct GreedyCacheEntry {
pub file: RedexFile,
pub last_read: Instant,
pub bytes: u64,
pub origin_hash: u64,
/* private fields */
}Expand description
One per-channel cache entry.
Fields§
§file: RedexFileThe cache file. Heap-only by default; persistent opt-in via
the runtime’s config. Caller constructed via
Redex::open_file(channel, RedexFileConfig::default() .with_retention_max_bytes(per_channel_cap_bytes)).
last_read: InstantLast time the cache was read by an upstream consumer.
Updated by GreedyCacheRegistry::touch on every cache
hit; LRU ordering itself is driven by lru_pos.
bytes: u64Bytes appended to this cache file since registration. Upper bound on retained bytes (retention may evict).
origin_hash: u64Most-recently-observed origin_hash for the chain this
cache entry holds. Set on first cache-write and refreshed
on each subsequent observation. Used by the data-gravity
layer to key heat counters per origin (heat:<hex>=<rate>
matches the chain’s causal:<hex> advertisement). Zero
if no event has landed yet (cache file opened but no
observation).