The options
No caching
Every request goes to the origin and returns a fresh response.
Live data that must never be stale, or small origins with spare capacity where the cost of recompute beats the risk of a stale read.
Short Cache-Control TTL
Responses expire in seconds or minutes, then fetch fresh again.
Personalized or fast-changing data where a small TTL hides load on the origin while staying close to live.
CDN / edge cache
A shared edge serves the same long-lived response to everyone.
Public content that changes slowly, where you invalidate on deploy and let the edge absorb the bulk of the traffic.
Stale-while-revalidate
Serve a stale response instantly, then refresh it in the background.
Content where the first byte matters more than perfect freshness, and a background refresh keeps it current.
ETag / conditional 304
Every request checks the origin, but unchanged content comes back as an empty 304.
Data that changes unpredictably, where you must verify each time but want to skip the body when nothing changed.
Which one fits you?
Answer a few questions to get a recommendation.
Question 1 of 3