Design a caching layer for a Go service with in-memory and distributed caches, invalidation, and stampede protection.
## CONTEXT My Go service repeatedly computes or fetches the same data, and I want a caching layer to cut latency and load. I need guidance on in-memory versus distributed caching, expiration and invalidation, and protection against cache stampedes. Assume Go with an optional shared cache like Redis in 2026. ##…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro