# Valkey Advisory Cache Service ## Module Concelier ## Status IMPLEMENTED ## Description Valkey (Redis-compatible) caching layer for canonical advisories with TTL policies based on interest score, PURL index lookups, hot set ranking, and p99 < 20ms read target. Includes cache warmup, metrics, and fallback mode. ## Implementation Details - **Modules**: `src/Concelier/__Libraries/StellaOps.Concelier.Cache.Valkey/` - **Key Classes**: - `ValkeyAdvisoryCacheService` (`src/Concelier/__Libraries/StellaOps.Concelier.Cache.Valkey/ValkeyAdvisoryCacheService.cs`) - Valkey-backed cache with TTL policies, PURL index, and hot set ranking - `AdvisoryCacheKeys` (`src/Concelier/__Libraries/StellaOps.Concelier.Cache.Valkey/AdvisoryCacheKeys.cs`) - deterministic cache key generation for advisory lookups - `CachingCanonicalAdvisoryService` (`src/Concelier/__Libraries/StellaOps.Concelier.Core/Canonical/CachingCanonicalAdvisoryService.cs`) - caching decorator wrapping the canonical advisory service - **Interfaces**: `IAdvisoryCacheService` - **Source**: SPRINT_8200_0013_0001_GW_valkey_advisory_cache.md ## E2E Test Plan - [ ] Store a canonical advisory in Valkey and retrieve it, verifying p99 read latency is < 20ms - [ ] Verify TTL policy: high-interest advisories have longer TTLs than low-interest ones - [ ] Verify PURL index lookup: query by PURL and verify matching advisories are returned from cache - [ ] Verify hot set ranking: frequently accessed advisories are promoted in the hot set - [ ] Verify cache warmup: on startup, verify high-interest advisories are pre-loaded into cache - [ ] Verify fallback mode: disable Valkey and confirm the service falls back to direct PostgreSQL queries