Inicio - Documentación - POM Cache - 07 Clearing and invalidation - Decide when the CDN must also be invalidated

Decide when the CDN must also be invalidated

POM Cache clearing and CDN invalidation solve different copies:

POM Cache action → generated file at the WordPress origin
CDN invalidation → object stored at an edge location

Deleting one does not delete the other.

First decide whether the CDN caches the response

Inspect the active CDN behavior for:

  • HTML page paths;
  • /pom-json/*;
  • /wp-json/pom/v1/progressive-archive/*;
  • locale-prefixed equivalents;
  • cookies and query strings in the cache key;
  • response headers that permit shared storage.

If a route is always forwarded and never cached at the edge, no invalidation is required for that route. If the edge stores it, origin clearing alone may leave visitors with the old object until expiry or revalidation.

Use urgency and remaining freshness

An immediate CDN invalidation is appropriate when:

  • the old response contains incorrect or legally sensitive public information;
  • a slug or route changed and the old edge object must stop serving;
  • the configured remaining edge lifetime is longer than the acceptable freshness window;
  • a global design or navigation release must appear at once;
  • you need a controlled production verification now.

Waiting for normal expiry may be reasonable when:

  • the response has a very short remaining freshness window;
  • the change is not urgent;
  • revalidation is known to fetch the corrected origin;
  • invalidation breadth or provider cost would outweigh the temporary difference.

Make this decision from the actual Cache-Control, CDN behavior, and object age—not from the origin file's age.

Correct order

  1. Save the source content or configuration.
  2. Clear the affected POM Cache store.
  3. Request the exact route directly from the origin.
  4. Confirm the corrected content and successful regeneration.
  5. Identify the viewer URL paths held by the CDN.
  6. Submit the smallest adequate CDN invalidation.
  7. Wait for completion.
  8. Verify the public URL at the edge.

If you invalidate before step 3, the edge can fetch the stale origin file and cache it again.

Select viewer paths

CDNs invalidate public URL paths, not POM Cache filesystem paths.

Correct type of target:

/products/
/es/products/
/pom-json/archive/product/*
/es/pom-json/archive/product/*

Wrong type of target:

wp-content/cache/pom-cache-json/example.com/es/archive/product/

Include both HTML and JSON viewer paths when both stores changed. A visitor can receive a fresh archive shell and then an old JSON batch if only the page path was invalidated.

Prefer the smallest safe scope

Choose:

  • one exact page for a page-specific correction;
  • one archive prefix for its pagination;
  • one locale prefix when only that public language changed and your edge design isolates it;
  • a wider site path only for truly global changes.

Do not copy POM Cache's broad current-site origin deletion directly into an indiscriminate CDN /*. The CDN may share a distribution across sites and may charge or limit invalidation paths.

Query strings and variants

Progressive JSON static delivery requires an empty query string, but the CDN may still cache query variants under its own policy. Confirm whether the edge:

  • ignores query strings;
  • forwards but does not cache them;
  • caches each value separately.

Also consider trailing slashes, redirects, locale prefixes, content encoding, and viewer-request URI rewrites. Invalidate the paths the viewer actually uses and any rewritten cache key required by the provider.

Verify origin and edge separately

After completion:

  1. Compare response content at origin and public edge;
  2. Inspect CDN cache-status and age headers;
  3. Confirm the first public request refilled from the corrected origin;
  4. Repeat and confirm the new object is served;
  5. Test a representative JSON batch after the HTML page;
  6. Verify an unrelated site or path was not evicted unnecessarily.

For the complete CloudFront-oriented workflow and path rules, see Coordinate POM Cache clearing with CDN invalidation. This guide should be used as the decision checkpoint before that operational procedure.