Skip to content

Which Caching Strategy? Explained

Answer a few questions about how stale your data may be, who it is shared with, and how much traffic your origin can take to find the right caching approach: no cache, a short TTL, a CDN, stale-while-revalidate, or conditional ETag checks.

Caching trades freshness for speed and origin protection. Three things decide the right strategy: how stale the data may be, whether it is shared by many users or personalized per user, and how much traffic your origin can absorb. Answer below to get a recommendation, ranked against the alternatives.

Decision guide · 5 options

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

How stale can the data be?