Back to Backend

What is caching in backend systems: HTTP Cache-Control, reverse proxies, and Redis?

Caching means storing a copy of a result to serve faster on the next request. HTTP has Cache-Control and friends so browsers and CDNs can reuse responses when safe. A reverse proxy or API gateway can cache at the edge. In-process or Redis caches save database round trips for expensive reads, with TTLs and invalidation as the hard part. Stale-while-revalidate, ETags, and key naming are all interview topics at mid level. The wrong cache can leak private data to the wrong user - never cache user-specific pages with a public shared key without vetted rules.

Cache-Control: public, max-age=60
# vs private / no-store for sensitive pages
# Redis: await redis.get(`user:${id}`) with TTL in app code

Start simple: try this concept in a tiny project before moving to advanced tools.

cachingredisperformance

Want to check this topic right now?

Check this question