Decision metadata
status: "accepted" date: "2026-02-01" decision-makers: "API guild, SRE" consulted: "DB owners" informed: "Product teams using approved routes"
Use Redis for short-lived application caching
Context and Problem Statement
Repeated reads hammer the database on hot API paths. We need acceleration without erasing the boundary between fast path and system of record.
Decision Drivers
- Latency and load on primary storage
- Correctness when cache misses or evicts
- Operations already know Redis in this environment
Considered Options
- No cache — simplest; still slow and expensive at peak
- In-process only — uneven under horizontal scale
- Redis TTL cache — shared, measurable, not authoritative
Decision Outcome
Chosen option: "Redis TTL cache", because it is shared, measurable, and SRE already operates Redis; database remains source of truth.
Consequences
- Good, because fewer DB reads on hot paths; key design and invalidation become explicit review topics
- Bad, because Redis unavailability or slowness must degrade safely
- Bad, because cache correctness becomes a correctness topic, not perf-only
Confirmation
Cache owners + SRE sign-off in review before enabling new cached routes in prod.
Pros and Cons of the Options
No cache
- Good, because simplest mental model
- Bad, because hot paths stay expensive at peak
In-process only
- Good, because no extra infra hop
- Bad, because uneven hit rates under horizontal scale
Redis TTL cache
Read-through, TTL-bound, allowlisted routes.
- Good, because shared cache and existing ops playbooks
- Good, because TTL keeps staleness bounded when designed well
- Bad, because extra dependency and careful invalidation work
More Information
SRE flush runbook; naming convention for keys; allowlist process for new routes.