Caching works at every layer: the browser, a CDN at the edge, an application cache such as Redis, and the database's own query cache. Each layer removes work from the layers beneath it, which is why a well-cached system can serve orders of magnitude more traffic on the same hardware.
The hard part is invalidation — knowing when cached data has become wrong. Time-based expiry is simple and accepts a window of staleness. Event-based invalidation is precise and easy to get subtly wrong. The most damaging failure mode is caching user-specific data under a key that is not user-specific, which serves one person's data to another; any cache key touching personalised content deserves explicit review.
Codazz builds this in production — Performance & Scaling.