KmemoProperties

@ConfigurationProperties(prefix = "kmemo")
class KmemoProperties

Configuration for the auto-configured dev.kmemo.SemanticCache, bound from the kmemo.* properties.

kmemo:
threshold: 0.9
candidates: 8
negative-cache-size: 10000
negative-cache-ttl: 5m

Only the model-agnostic knobs are exposed here. Anything that needs a real object — the dev.kmemo.Embedder, a dev.kmemo.CacheStore, a dev.kmemo.Verifier, the guard set — is a bean you define, which the auto-configuration picks up. See KmemoAutoConfiguration.

A plain mutable JavaBean rather than a data class: Spring's setter binding is the one path that works cleanly for a Kotlin config class whose every field has a default.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

How many nearest entries to examine per lookup.

Link copied to clipboard

Whether concurrent identical misses wait for the first to compute.

Link copied to clipboard

Size of the negative cache (0 disables it); reuses a just-missed embedding.

Link copied to clipboard

How long a remembered miss stays usable, e.g. 5m; null keeps it until evicted.

Link copied to clipboard

Minimum cosine similarity for a candidate to be considered; calibrate it for your model.