Skip to main content

Crate aa_cache

Crate aa_cache 

Source
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§

CachedValue
A value stored in the L1 cache together with the Instant it was inserted.
L1Cache
In-process L1 cache that fronts a CacheSource with a DashMap.

Traits§

CacheSource
The backing store an L1Cache fronts.