Scaling

What is caching and why does it matter?

Caching stores a result so you don't compute or fetch it again:

  • Browser cache: files stay on the visitor's device
  • CDN cache: pages and assets served from a location near the visitor (Cloudflare, Vercel)
  • Application cache: Redis holds expensive query results or sessions
  • Database cache: materialised views for heavy reports

Why: it cuts response times and server cost dramatically. The hard part is invalidation — decide when cached data must refresh.

All guides