AbstractProtectedbuildAbstractclearProtectedcreateAbstractdeleteAbstractgetReturns 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
AbstractkeysProtectedlogAbstractsetAbstractsizeProtectedupdateProtectedUpdates 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