2 min read
What it is
Stale-while-revalidate (SWR) is a caching strategy where an expired cache entry is served immediately to the user while a fresh copy is fetched in the background for next time. The user never waits on the origin, and the cache is at most one cycle behind.
For the public API
SWR pairs well with the cacheable public reads — loyalty tiers, billers, CMS pages. Serve the stale ladder instantly, refresh behind the scenes, and your pages stay fast without ever showing badly outdated data. See caching the loyalty ladder.
Frequently asked questions
Is SWR safe for the loyalty endpoint?
Yes. The data changes rarely and carries no PII, so serving a slightly stale ladder while refreshing is both safe and fast.
Funding for UK limited companies
Credicorp lends to your company, not to you personally — short-term working capital with no personal guarantee. See what your business could access.