AbstractProtectedbuildAbstractclearProtectedcreateProtectedCreates a cache entry with metadata and expiration information.
The value to cache
Optionaloptions: common.apis.cache.CacheSetOptionsOptional caching configuration
A complete cache entry object
AbstractdeleteAbstractgetReturns a copy of the current cache statistics.
Current cache performance statistics
AbstracthasProtectedisProtectedChecks if a cache entry has expired based on its expiration timestamp.
The cache entry to check
True if the entry has expired
AbstractkeysProtectedlogAbstractsetStores a value in the cache with optional configuration. Must be implemented by concrete cache classes.
The cache key to store under
The value to cache
Optionaloptions: common.apis.cache.CacheSetOptionsOptional caching configuration (TTL, metadata)
AbstractsizeProtectedupdateProtectedUpdates cache statistics for performance monitoring.
The type of operation that occurred
Optionalcontext: { Additional context for hit/miss logging
OptionalfullOptionalkey?: stringOptionalreason?: string
Abstract base class providing common functionality for cache implementations. Handles statistics tracking, key building, entry creation, and logging.
Example