Static-first is the right default for a content site, but a daily product has one part that refuses to be fully static: the answer of the day. Caching that part badly is how a fast site becomes an untrustworthy one.
The setup I run is deliberately boring. A build step writes one page per edition, immutable and dated. Those pages are cached forever, because their content never changes after publication. An index page points at the current edition, and that index is the only resource with a short cache life. Everything the user sees is either immutable or a tiny pointer, and the pointer is the only thing that has to be fresh.
The key insight is that freshness is a property of the pointer, not of the content. Once you separate them, the CDN configuration becomes simple: long-lived cache for edition pages, seconds for the index, and no cache at the edge for the API that resolves "current". The common failure mode is caching the resolved current page under a stable URL. That is exactly how a site ends up showing yesterday's answer for an hour after reset.
The second rule is that every cached response carries the edition it refers to. If the pointer is stale, the page can still be honest about which day it is showing. Honesty is cheaper than correctness here: a page that says "the 21st edition" and shows the 21st is fine even if the 22nd has already begun. A page that says "today" and shows the 21st is a bug report waiting to happen.
The third rule is pre-warming. The build already knows the next edition, so it can generate and warm the next page before the reset. Pre-warming turns the riskiest minute of the day into a non-event. If you want to see what a static-first daily site looks like in practice, visit the site after a reset, and then try a round on a page that is deliberately not cached, because practice content does not depend on a clock.
Top comments (0)