Inicio - Documentación - POM Cache - 03 Static page cache - Enable the static HTML cache

Enable the static HTML cache

This procedure enables static HTML generation for one site and proves that the first public page can be written safely. It does not install Apache rules, enable Progressive JSON, or configure a CDN.

Before changing the runtime

Choose a test page that is:

  • published and publicly accessible;
  • served from a normal trailing-slash permalink;
  • not a search, preview, 404, feed, account, cart, or checkout route;
  • free of visitor-specific output;
  • easy to recognize after a cache purge.

Use a private browser window with an empty cookie jar. Keep a logged-in window open separately for WordPress administration.

Check the bootstrap status

  1. Open POM Cache → Advanced → WordPress configuration.
  2. Review Drop-in, POM_CACHE_HOME, and WP_CACHE.
  3. Continue only when each item displays OK.

If an item shows Needs manual change, follow Install and verify the advanced-cache drop-in. Enabling the runtime before the drop-in is ready can still allow generation through the normal plugin load, but it does not provide the intended early PHP hit path.

Select the invalidation policy

Open POM Cache → General → Runtime.

Set:

  • Caching to Enabled.
  • Purge HTML on post changes to Entire site when post data appears in listings, navigation, or shared templates; choose Edited post single only when only that post's canonical single must be refreshed.
  • Purge HTML on term changes according to whether term names, descriptions, assignments, or ordering can affect cached pages.

The purge controls default to disabled. Edited post single only also removes every localized single URL when POM Translate is active, but it deliberately preserves home, archive, taxonomy, navigation, and other cached pages. If you keep either purge disabled, document who uses Delete Cache after the corresponding content change.

Save the settings.

Remove an old baseline

Under General → Cache tools:

  1. read the current Cache Contents count and size;
  2. select Delete Cache;
  3. wait for the success message;
  4. refresh the section and confirm the current site’s HTML count is zero.

This action does not delete Progressive JSON and does not purge a CDN.

Generate the test page

  1. In the private window, open the canonical page without a query string.
  2. Let the document finish loading.
  3. Return to Cache tools and refresh the status.
  4. Confirm at least one cached page is reported.

The first visitor receives WordPress’s original response buffer. POM Cache adds its generation comments to the stored copy, so do not require those comments to appear until the file is reused.

Prove the second request is different

Reload the exact same URL, view its source, and look for a comment similar to:

<!-- Cached page generated by POM-Cache on 2026-07-27 12:34:56 -->

The timestamp is an example. Record it, reload again, and confirm it does not change.

  • If PHP serves the file, the response includes X-POM-Cache: Served static cache from PHP; phase=early.
  • If Apache serves it, PHP does not add that header; the stored comment and unchanged timestamp prove that the existing file was reused.

When a CDN is already active, use an approved origin request or invalidate the edge before drawing a conclusion.

Confirm authenticated traffic remains dynamic

Open the test page in the logged-in browser. Confirm that:

  • the public cached file was not delivered as an early hit;
  • authenticated controls and content are correct;
  • visiting while logged in did not replace the anonymous file.

The cached-page count can remain unchanged. Bypass protects the request without deleting the safe public copy.

Disable safely

Changing Caching to Disabled stops POM Cache’s PHP generation and PHP static delivery for that site. It does not erase files automatically, and an installed Apache rewrite can still serve a matching existing file before PHP reads the setting.

For a complete rollback:

  1. disable Caching;
  2. use Delete Cache;
  3. disable the POM Cache HTML rewrite block at the web-server layer;
  4. invalidate relevant CDN objects;
  5. request representative URLs and confirm WordPress now renders them.

Next, review Which pages can be cached before warming more than the controlled test page.