Skip to main content

Module cache

Module cache 

Source
Expand description

Per-edge query result cache.

Hash-keyed by (query_fingerprint, params_hash). Each entry carries a monotonic version so an invalidation can sweep everything older than a known commit point in one pass.

LRU eviction kicks in at max_entries. Concurrent reads share a parking_lot RwLock; concurrent writes are serialised by the same lock — fine because writes are rare on the edge (only on pull-on-miss + invalidation sweeps).

Structs§

CacheEntry
One cached query result.
CacheKey
Cache key — the (fingerprint, params_hash) pair. Both sides are strings so the same key works whether params are plain text or hashed by an upstream caller.
EdgeCache
LRU + version + TTL cache. Cheap to clone via Arc.
EdgeCacheStats