How to cache API GET requests at a CDN

Cache public API GETs at Cloud CDN with explicit TTLs and purge, bypass Authorization-varying JSON, and shield the API origin.

Not every API response needs a fresh origin hop. Public product, content and configuration GETs are often identical. Cache those. Never cache the ones that change with Authorization.

Mark the safe GETs

Catalogue, published CMS content, feature flags that are global, and OpenAPI docs are typical. Set a TTL that matches how wrong a stale answer can be, plus purge from the publish pipeline.

Bypass the rest

POST, PATCH, PUT, DELETE, and any GET that varies on Authorization or cookies. GraphQL POSTs usually bypass unless you have persisted public GET queries you fully control.

Shield and short TTLs

APIs with 15-60 second TTLs create regular miss storms. Origin Shield is how a small API cluster survives that pattern.

Tokens for private GETs

If a GET is cacheable for a cohort but not the world, token authentication can gate the cached object. Application auth still owns entitlements.

Frequently Asked Questions

Only public identical queries. Most GraphQL POSTs should bypass cache.

No. Cloud CDN is delivery and cache. AuthZ, rate limits and routing at the gateway remain.

Useful for clients. Purge or TTL still decide when the shared CDN copy changes.

Put this on Cloud CDN.

Get started with our Management Console in less than 2 minutes, or connect with an expert to supercharge your business today.