Full Stack Developer
hardcdn-and-caching-strategy

How do you use a CDN and caching to improve full stack performance?

Answer

CDNs cache static assets near users. **Strategy:** - Cache static assets aggressively (hashed filenames) - Use HTTP caching headers (`Cache-Control`, `ETag`) - Cache SSR/HTML selectively when safe - Add API caching where appropriate (Redis) **Interview tip:** explain cache invalidation via content hashing for assets and careful TTL for dynamic data.

Related Topics

PerformanceCachingCDN