Documentation
¶
Overview ¶
Package cache is a session-scoped, in-memory TTL memoizer for slow keyed lookups - the suggestion queries and per-key option lists that would otherwise re-hit a remote source on every keystroke or reopen. A Get within the TTL window reuses the last good result for that key; past expiry it refetches. Values are keyed and cached independently, and errors are never cached so a transient failure retries. Nothing here touches disk and nothing survives the process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TTL ¶
type TTL[K comparable, V any] struct { // contains filtered or unexported fields }
TTL memoizes a slow, keyed lookup for a TTL window so repeated queries reuse the last good result instead of re-hitting the source.
Click to show internal directories.
Click to hide internal directories.