@breadstone/archipel-platform-caching
Classes
| Class | Description |
|---|---|
| CachingHealthIndicator | Health indicator for the caching layer. |
| MemoryLayeredCache | In-memory layered cache with LRU eviction, TTL expiration and optional stale-while-revalidate support. Falls back to an asynchronous loader function on cache misses. |
| NoopCacheMetricsRecorder | No-op implementation of ICacheMetricsRecorder used as the default when no external metrics backend is configured. |
| RedisLayeredCache | Redis-backed layered cache implementation. Falls back to an asynchronous loader function when the requested key is not present in Redis. |
Interfaces
| Interface | Description |
|---|---|
| ICacheMetricsRecorder | Metrics recorder for cache operations. Implementations can forward measurements to Prometheus, OpenTelemetry, or any other backend. |
| ICacheStats | Cache statistics snapshot returned by cache implementations. |
| ILayeredCache | Generic layered cache contract supporting synchronous and asynchronous access patterns with optional warm-up and statistics. |
| ILayeredCacheOptions | Configuration options for MemoryLayeredCache. |
| IRedisLayeredCacheOptions | Configuration options for RedisLayeredCache. |
Variables
| Variable | Description |
|---|---|
| CACHE_DEFAULT_TTL_MS | Default cache TTL in milliseconds applied when no provider-specific TTL is configured. |
| CACHE_MAX_ENTRIES | Maximum number of entries retained in an in-memory cache (LRU limit). |
| CACHE_STALE_WHILE_REVALIDATE | Whether expired entries are served while a background refresh is in progress. |
| PLATFORM_CACHING_CONFIG_ENTRIES | All configuration entries required by platform-caching. |
| REDIS_CONFIG_ENTRIES | Configuration entries required by the Redis caching provider. |
| REDIS_KEY_PREFIX | Key prefix applied to all Redis keys managed by the cache instance. |
| REDIS_TTL_SECONDS | TTL in seconds applied to every stored Redis entry. |
| REDIS_URL | Redis connection URL (e.g. redis://localhost:6379). |