Skip to main content
Cloud CDN’s edge cache is shared between visitors. A browser cache stores responses on one visitor’s device. Configure and test them separately.

Start with the content

If one distribution serves both public assets and private application paths, use delivery rules to apply path-specific settings. Verify the matched rule as well as the distribution’s base configuration.

Set edge and browser freshness

Open the distribution’s Cache page. Both edge_cache and browser_cache have an enabled switch, a controlled_by mode, and a TTL in seconds. For a public file that changes at the same URL, an edge TTL of 3,600 seconds allows an edge copy to remain fresh for an hour. Choose the browser TTL separately: an edge purge cannot remove copies already stored in visitors’ browsers. Use versioned URLs such as /assets/app.8f3c.css when you need long browser freshness and predictable releases.

Choose query-string behavior

The cache_key.ignore_query_string object controls whether query parameters distinguish cached responses. For example, if ?v=1 and ?v=2 select different assets, ignoring v can return the wrong release. Ignoring a tracking parameter is appropriate only when that parameter does not affect the response. A custom key can use supported variables such as $request_uri, $uri, $scheme, and $http_x_cdn_real_host. Use a custom expression only when you can explain every input that distinguishes responses.
A cache key that omits tenant, authentication, language, device, or content-version inputs can serve one variant to the wrong requester. A unique cache key alone does not make private content safe to store in a shared cache.

Review optional controls

Keep these disabled unless the workload needs them and you have tested the resulting behavior.

Save and test

  1. Save the cache configuration. Through the API, submit the full cache document; follow update configuration.
  2. Request a known public file through the CDN hostname and inspect the status, body, and cache headers.
  3. Repeat the same request, then test meaningful query variants and paths governed by delivery rules.
  4. Check request logs and analytics when available. A single request or missing cache header does not establish cache behavior across all locations.
  5. After correcting a policy, purge affected paths if existing edge copies must be invalidated.
If the origin is correct but visitors still see an old response, compare the same URL at the origin, the CDN, and the browser. Browser caches, service workers, edge caches, and query variants can retain different copies.