The lesson opens with an e-commerce team whose Postgres CPU sat at 98 percent at peak. The cause was one product catalog query. It ran 50,000 times per minute, but the catalog changed about once a day.
The fix was a caching proxy with the same method, getProducts(). The proxy checked Redis first. On a hit it returned in 0.3 ms. On a miss it queried Postgres, stored the result with a 60-second TTL, and returned it. TTL, or time to live, is how long a cached copy is kept before it expires.
In the lesson's story, database CPU fell from 98 percent to 12 percent. Response times dropped from 45 ms to under 2 ms for 92 percent of requests. No caller changed a line of code, because the interface did not change.