Interactive demo of HTTP caching strategies. Each endpoint uses a different Cache-Control pattern. Hit the buttons and watch the origin hit count — cached responses won't increment it.
5-minute CDN cache with 1-hour SWR window. Also includes an ETag for conditional revalidation — when the CDN checks the origin, it may get a 304 (no body).
Private / No Store
GET /api/private
Cache-Control: private, no-store
Never cached by the CDN. Every request reaches the origin. Use for authenticated or user-specific data. Notice the origin hit count always increases.
Vary: Content Negotiation
GET /api/content-negotiation
Cache-Control: public, s-maxage=60 | Vary: Accept
The CDN caches separate entries per Accept header. JSON and HTML requests get different cached responses from the same URL.