2 min read
Pick a TTL
The tier config changes rarely, so a five-minute TTL is a good balance — a stale ladder for a few minutes is harmless, and you cut the origin calls dramatically.
Use the freshness marker
Each response carries a generated UTC timestamp. Use it as the freshness dimension of your cache key so you can tell a fresh value from a stale one and invalidate cleanly.
Stale-while-revalidate
If your cache supports it, serve the stale copy immediately while refreshing in the background. The user never waits on the origin, and the ladder is at most one TTL behind.
Public vs private cache
There is no PII in the response, so a shared/CDN cache is safe. See Caching public-API responses for the general rules.
Frequently asked questions
Is it safe to cache this in a CDN shared by all users?
Yes. The response is public vocabulary with no PII, so a shared cache carries no cross-user leakage risk.
How do I invalidate?
Watch the generated timestamp; when it moves, the config changed and you can refresh. A short TTL means you rarely need manual invalidation.
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.