CachingVerifier

constructor(delegate: Verifier, maxEntries: Int = DEFAULT_MAX_ENTRIES, ttl: Duration? = null, clock: Clock = Clock.systemUTC())

Parameters

delegate

the verifier whose verdicts are memoized.

maxEntries

hard cap on remembered verdicts; the least recently used goes first.

ttl

how long a verdict stays usable, or null to keep it until it is evicted. A prompt's correct answer can change over time (yesterday's "latest release" is not today's), so a finite TTL is the safer choice for anything time-sensitive.

clock

time source; substitute a fixed clock in tests instead of sleeping.