Skip to main content

Module cache

Module cache 

Source
Expand description

Entity cache for snapshot-on-subscribe functionality.

This module provides an EntityCache that maintains full projected entities in memory with LRU eviction. When a new client subscribes, they receive cached snapshots immediately rather than waiting for the next live mutation.

Structs§

CacheStats
A point-in-time count of an EntityCache’s contents.
EntityCache
Entity cache that maintains full projected entities with LRU eviction.
EntityCacheConfig
Configuration for the entity cache
EntityLifetimeCheckpoint
The authoritative account lifetime known for one projected entity.
LifetimeOrdering
Independent ordering metadata attached to one projected cache write.
SnapshotBatchConfig

Enums§

CacheWrite
What EntityCache::upsert_with_append did with a patch.
PatchOrigin
Whether a patch creates its entity, as far as its source says.

Functions§

cmp_seq
Compare two _seq values numerically. _seq format is “{slot}:{offset}” where slot is not zero-padded. This handles digit-count boundaries correctly (e.g., 99999999 < 100000000).

Type Aliases§

EntityLifetimes
(view, key, checkpoint) in most-recently-changed order.
EntityTombstones
Legacy (view, key, _seq) barriers, retained only to restore snapshots written before account positions had their own ordering domain.