Catalog Cache
Non-authoritative FusionCache and Redis caching layer owned by the Catalog bounded context for fast book detail lookups and dashboard summaries.
Purpose & Ownership Boundary
Catalog Cache is the non-authoritative, read-through caching tier owned by Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs in the Catalog bounded context in front of Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs. It pairs an in-process L1 memory tier with a shared Redis L2 distributed tier and backplane to accelerate repeated book detail lookups and dashboard aggregations across replicas.
Data Store Profile
| Property | Value |
|---|---|
| Bounded Context / Owner | Catalog — Catalog Experience TeamTeamCatalog Experience TeamStream-Aligned team owning BookWorm's product catalog, customer reviews, and storefront/backoffice discovery experience....Open docs |
| Engine / Technology | Redis + FusionCache (Azure Managed Redis in cloud; Redis container locally) |
| Store Type | Cache |
| Primary Writer(s) | Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs |
| Primary Reader(s) | Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs |
| Authoritative / Source of Truth | Derived Read Model (Ephemeral) |
| Data Classification | Internal |
| Retention / TTL Policy | Transient (30-minute default TTL; 15-second dashboard TTL; 2-hour fail-safe window) |
Logical Data Layout & Key Patterns
| Key Pattern | Stored Data | TTL / Eviction | Invalidation / Update Trigger |
|---|---|---|---|
book:{id} | Pre-DTO BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs projection (title, description, permanent blob URN, pricing, status, relations, rating summary, row_version) | 30 minutes (Caching:Expiration default) | Event-driven eviction on book mutations, propagated across replicas via the Redis backplane. |
catalog:dashboard:v1 | Aggregated catalog dashboard counts and summary metrics | 15 seconds | Time-based TTL expiration only (no event-driven eviction). |
| Feature-scoped list keys | Paginated catalog book list payloads | 30 minutes (Caching:Expiration default) | TTL expiration or tag/key eviction on catalog updates. |
| Integration idempotency keys | 24-hour message deduplication markers | 24 hours | Automatic TTL expiration after consumer processing. |
Consistency, Isolation & Security Guardrails
- Permanent URNs over SAS URLs: Cached book entries store the permanent blob URN from Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs rather than expiring SAS URLs, ensuring every API read resolves a fresh read-only SAS token from Catalog Blob StorageContainerv1.0.0Catalog Blob StorageAuthoritative Azure Blob Storage container owned by the Catalog bounded context for binary book cover images and media a...Ownercatalog-experience-teamDiagramOpen docs.
- Fail-safe & stampede protection: Distributed Redis locking coordinates cache-miss factories across replicas, and a 2-hour fail-safe window serves stale entries briefly if the backing database is momentarily degraded.
- Dashboard staleness window: Dashboard aggregates (
catalog:dashboard:v1) can lag live writes by up to15 secondsdue to TTL-only expiration.
Shared Redis Key-Prefix & Flush Isolation: Catalog Cache shares the redis cluster with Basket DatabaseContainerv1.0.0Basket DatabaseAuthoritative Redis key-value store owned by the Shopping bounded context for customer-scoped pre-checkout shopping bask...Ownercommerce-fulfillment-teamDiagramOpen docs, Order Cache and Distributed LocksContainerv1.0.0Order Cache and Distributed LocksRedis-backed coordination and caching slice owned by the Ordering bounded context for buyer-scoped creation locks, HTTP ...Ownercommerce-fulfillment-teamDiagramOpen docs, Rating CacheContainerv1.0.0Rating CacheNon-authoritative FusionCache and Redis caching layer owned by the Reviews bounded context for AI-generated book feedbac...Ownercatalog-experience-teamDiagramOpen docs, and Notification idempotency markers. Never issue a global FLUSHALL/FLUSHDB on the shared instance—doing so simultaneously erases active customer baskets, distributed checkout locks, and 24-hour Kafka idempotency guards across five services. Always target book:{id} or catalog:* keys for manual invalidation.
Operational & Resilience Notes
- Local vs. Cloud: Local development runs a persistent single-container Redis instance with
RedisInsight; cloud environments run Azure Managed Redis (
BalancedB0in Dev,BalancedB1with HA in Staging,BalancedB5with HA in Production). - Disposable state: Every entry in Catalog Cache is fully rebuildable from Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs on cache miss. - Observability: Monitor FusionCache OpenTelemetry hit/miss metrics and Redis latency when diagnosing elevated PostgreSQL read load.
Architecture Visualizations
Loading graph...
Related Documentation
- Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs — Owning service read/write paths and cache eviction handlers.
- Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs — Authoritative PostgreSQL system of record behind this cache.
- Catalog Blob StorageContainerv1.0.0Catalog Blob StorageAuthoritative Azure Blob Storage container owned by the Catalog bounded context for binary book cover images and media a...Ownercatalog-experience-teamDiagramOpen docs — SAS URL resolution for cached book image URNs.
- ADR-004: Use FusionCache with Redis for selected catalog readsDecision Recordv1.0.0ADR-004: Use FusionCache with Redis for selected catalog readsHot book lookups and the dashboard summary are cached through a FusionCache L1 in-process plus Redis distributed layer, ...Ownercatalog-experience-teamOpen docs — Decision adopting two-tier FusionCache with Redis backplane.
- Backup, Restore & Disaster Recovery (DR)Custom DocBackup, Restore & Disaster Recovery (DR)Operator runbook for PostgreSQL point-in-time restore, Cosmos DB failover verification, Blob Storage recovery, and Qdran...Ownerplatform-engineering-teamOpen doc — Platform backup, restore, and disaster recovery runbook.