Skip to content
@archipel/platform-caching Auto-generated

@breadstone/archipel-platform-caching

Classes

ClassDescription
CachingHealthIndicatorHealth indicator for the caching layer.
MemoryLayeredCacheIn-memory layered cache with LRU eviction, TTL expiration and optional stale-while-revalidate support. Falls back to an asynchronous loader function on cache misses.
NoopCacheMetricsRecorderNo-op implementation of ICacheMetricsRecorder used as the default when no external metrics backend is configured.
RedisLayeredCacheRedis-backed layered cache implementation. Falls back to an asynchronous loader function when the requested key is not present in Redis.

Interfaces

InterfaceDescription
ICacheMetricsRecorderMetrics recorder for cache operations. Implementations can forward measurements to Prometheus, OpenTelemetry, or any other backend.
ICacheStatsCache statistics snapshot returned by cache implementations.
ILayeredCacheGeneric layered cache contract supporting synchronous and asynchronous access patterns with optional warm-up and statistics.
ILayeredCacheOptionsConfiguration options for MemoryLayeredCache.
IRedisLayeredCacheOptionsConfiguration options for RedisLayeredCache.

Variables

VariableDescription
CACHE_DEFAULT_TTL_MSDefault cache TTL in milliseconds applied when no provider-specific TTL is configured.
CACHE_MAX_ENTRIESMaximum number of entries retained in an in-memory cache (LRU limit).
CACHE_STALE_WHILE_REVALIDATEWhether expired entries are served while a background refresh is in progress.
PLATFORM_CACHING_CONFIG_ENTRIESAll configuration entries required by platform-caching.
REDIS_CONFIG_ENTRIESConfiguration entries required by the Redis caching provider.
REDIS_KEY_PREFIXKey prefix applied to all Redis keys managed by the cache instance.
REDIS_TTL_SECONDSTTL in seconds applied to every stored Redis entry.
REDIS_URLRedis connection URL (e.g. redis://localhost:6379).

Released under the MIT License.