Creates a new in-memory cache instance.
Optionalconfig: common.apis.cache.CacheConfigCache configuration options
ProtectedbuildProtectedcreateProtectedCreates a cache entry with metadata and expiration information.
The value to cache
Optionaloptions: common.apis.cache.CacheSetOptionsOptional caching configuration
A complete cache entry object
Returns a copy of the current cache statistics.
Current cache performance statistics
ProtectedisProtectedChecks if a cache entry has expired based on its expiration timestamp.
The cache entry to check
True if the entry has expired
ProtectedlogStores a value in the memory cache.
The cache key to store under
The value to cache
Optionaloptions: common.apis.cache.CacheSetOptionsOptional caching configuration (TTL, metadata)
ProtectedupdateProtectedUpdates cache statistics for performance monitoring.
The type of operation that occurred
Optionalcontext: { Additional context for hit/miss logging
OptionalfullOptionalkey?: stringOptionalreason?: string
In-memory cache implementation using a JavaScript Map. Fast and simple, but data is lost when the process exits.
Example