Caching

Where does the cache sit?

A product page API is read-heavy: ~90% of traffic is GET /products/{id}, which currently hits Postgres every time. p99 is 120ms and the DB CPU is hot. In 6-10 sentences, where would you put a cache, what would you store, and how would a write to the product update that cache?

Beginner drill question.

Write it as you would say it in the interview: assumptions, the design, tradeoffs, and what you would do next. The draft saves in this browser.

Review the lesson