Effective caching reduces load times and server costs.
Browser HTTP cache: Set Cache-Control headers. Works automatically.
Service Worker cache: Programmatic control. Enables offline.
In-memory cache: Store API responses in state or dedicated cache.
Cache invalidation patterns:
- Time-based: Expire after N seconds
- Stale-while-revalidate: Serve stale, fetch fresh in background
- Event-based: Invalidate when data changes
Interview tip: Discuss cache lifetime and invalidation strategy. "We'll cache it" isn't enough.