Expand description
In-process L1 cache for the Agent Assembly storage layer.
Policy is queried on the tool-call critical path, so a backend round-trip
(Postgres or Gateway) per call is too expensive. L1Cache wraps any store
behind an in-process DashMap with a configurable TTL and
per-key stampede protection, so hot lookups hit memory and never cross the
network.
The wrapped store is abstracted by the CacheSource trait, which is
blanket-implemented for aa_core::storage::PolicyStore; the cache itself is
agnostic to which store it fronts.
Invalidation (this is what the Epic C push-invalidation channel will call)
is provided by L1Cache::invalidate.
Structs§
- Cached
Value - A value stored in the L1 cache together with the
Instantit was inserted. - L1Cache
- In-process L1 cache that fronts a
CacheSourcewith aDashMap.
Traits§
- Cache
Source - The backing store an
L1Cachefronts.