OptionalcloneWhether get() deep-clones the cached entry before returning it.
Defaults to true, which preserves the mutation-safety guarantee: a
caller that mutates the returned object cannot corrupt the cached
copy or affect subsequent reads. Set to false to skip the read-side
clone: every cache hit then returns the cached object itself, so a
caller that mutates it poisons later hits. Disable only when cached
responses are treated as immutable. The write-side clone in set()
is unaffected: the cache never aliases the caller's object either
way.
OptionalmaxThe maximum number of entries to retain. Defaults to 128. Entries are evicted LRU when the cap is reached.
OptionalttlThe time-to-live for cached entries, in milliseconds. Defaults to
60_000 (1 minute). 0 disables retention entirely: every set() is
a no-op and every get() is a miss, so a shared cache instance can be
wired in for shape-compatibility while a particular workload opts out
of caching without constructing a second client.
Configuration for the opt-in response cache.