StaticcleanupStaticclearDelete cached entries.
Like clearByClassName, this is a re-fetch and steps over
persistent operational state (see cacheKeys.ts). The broad gesture is the
one an operator reaches for when a symptom spans several destinations,
which is exactly when quietly discarding what we have observed does the
most damage. Pass includePersistent for a genuine full wipe.
StaticclearDelete cached entries across every destination. Returns number deleted.
Steps over persistent operational state for the same reason
clearByClassName does; pass includePersistent for a full wipe.
StaticclearDelete all cache entries whose key contains the given class name.
Matches both plain keys (ClassName:method:args) and prefixed keys (prefix:ClassName:method:args).
Returns the number of deleted entries.
Keys carrying a PERSISTENT_KEY_FRAGMENTS fragment are stepped
over: this call means "refetch from upstream", not "forget what we have
observed". Pass includePersistent to sweep those too, which is a full
reset of the destination rather than a flush, and is what test setup
wants.
StaticdeleteStaticenableEnable temporary mode - use in-memory cache that doesn't persist Must be called before any cache operations
StaticenforceEnforce cache size limit by removing least recently accessed entries. Called periodically from set() rather than on every write.
StaticexpiresWhen the entry under key expires, as a millisecond timestamp.
Null when there is no live entry.
StaticgetStaticgetStatichasStaticisCheck if cache is in temporary mode
StatickeysStaticsetStaticsizeStaticstartStart automatic cleanup of expired entries
StaticstatsGet cache statistics
StaticstopStop automatic cleanup
StaticwrapCache-with-dedup wrapper. Concurrent callers on a cache miss for the same
key share a single execution rather than each running fn independently.
Either a fixed TTL in seconds, or a callback that derives a TTL from the function's result (e.g. for OAuth tokens that expire on a server-supplied schedule).
Optionalcaller: () => Omit<HttpCaller, "retryCount">
Returns who calls, for the method cache observer (see
setMethodCacheObserver). Called only on a hit while an
observer is set.
Remove all expired entries from cache