Package-level declarations
Types
Moves each scope's similarity threshold towards the value its own traffic justifies.
Decides whether a prompt has been asked often enough to be worth storing.
One cached prompt/response pair plus the vector used to find it again.
Something a SemanticCache (or its CacheStore) did, delivered to a CacheListener the moment it happens.
A CacheListener that republishes events as a Flow you can collect.
A read-only trace of how SemanticCache.explain evaluated one prompt — the tool you reach for when a hit you expected did not happen, or one you did not expect did.
A sink for CacheEvents, called inline the moment each one happens.
Outcome of SemanticCache.lookup.
Decides whether a prompt and its computed response may be persisted at all.
Counters for one SemanticCache instance, from creation to now.
Storage and nearest-neighbour search behind a SemanticCache.
Reorders the candidates that cleared the similarity threshold, before the guards see them.
One candidate entry and every guard's verdict on it, from a CacheExplanation.
A Verifier that reports how sure it is, so the caller sets where the line falls.
Which entry point a CacheEvent.Degraded came from.
What SemanticCache.getOrPut does when the Embedder throws.
Encrypts what a CacheStore persists, so a database full of user questions is not what an auditor finds.
Wall-clock nanoseconds spent in each stage of a single lookup, for latency metrics.
Why a CacheEvent.Eviction happened.
Why a CacheLookup.Miss happened.
Maximal Marginal Relevance: prefers a candidate that is close to the query and unlike the candidates already chosen.
The outcome of a CachePolicy decision.
How a CacheStore may compress vectors for the scan only.
Turns a typed response into the String a SemanticCache stores, and back.
An Embedder that retries a failing delegate with exponential backoff and jitter.
A CacheEntry together with its similarity to the query vector, in [-1.0, 1.0].
A cache keyed by what a prompt means rather than by its exact bytes.
Builds a SemanticCache with a DSL instead of a long positional constructor call.
What one threshold would have decided, and why.
What the cache would have done for one prompt, at each threshold it was asked about.
How SemanticCache.getOrPutStreaming replays a cached answer on a hit.
A SemanticCache bound to one tenant, through which nothing can reach another tenant's entries.
What one model call in a scope costs, declared by the caller.
Vector maths shared by SemanticCache and by CacheStore implementations.
One prompt/response pair to preload into a SemanticCache via SemanticCache.warm.
Functions
Wraps this verifier in a CachingVerifier that memoizes verdicts per (query, cachedPrompt) pair.
Wraps this embedder in a RetryingEmbedder that retries transient failures with jittered backoff.
Builds a SemanticCache with the SemanticCacheBuilder DSL.