Enable the progressive JSON cache
Use this guide to enable POM Cache for POM Theme progressive archive batches without changing the static HTML cache.
Before you begin
Confirm:
- POM Cache is activated and its WordPress configuration checks pass;
- POM Theme is active and at least one archive uses progressive loading;
- pretty permalinks are enabled;
- the configured Cache Location is writable by PHP;
- you can test as a logged-out visitor;
- you know whether a CDN is caching
/pom-json/or the equivalent REST path.
You do not need to enable static HTML Caching. The JSON subsystem has its own master switch.
Configure the runtime
On a single site, open Settings → POM Cache → General. On multisite, open Network Admin → Settings → POM Cache → General. Find Progressive JSON runtime.
-
Set Progressive JSON cache to Enabled.
-
Keep PHP early static serving set to Enabled.
-
Keep WordPress read fallback set to Enabled.
-
Keep JSON writes set to Enabled.
-
Leave Maximum JSON file size at
1048576for the initial test. -
Leave JSON Cache-Control header at:
public, max-age=30, s-maxage=30, must-revalidate -
Choose the automatic purge settings described below.
-
Save the settings.
These values provide both an early PHP hit path and a WordPress fallback. They are a good baseline before adding optional Apache rules.
Choose the purge switches
The three purge settings default to Disabled. Enable the ones that correspond to the data inside your progressive archive cards:
| Setting | Enable it when |
|---|---|
| Purge JSON on post changes | Editors create, update, publish, trash, restore, delete, or reclassify public posts that can appear in archives |
| Purge JSON on term changes | Archive output depends on taxonomy labels, hierarchy, existence, or term order |
| Purge JSON on translation changes | POM Translate changes can alter localized archive output or public slugs |
Each enabled event clears the complete JSON cache for the current site. On a large, frequently edited site, weigh that regeneration cost against the need for immediate freshness.
Term assignments made on an individual post follow the post-change switch. Editing the taxonomy term itself follows the term-change switch.
Generate the first file
POM Cache does not preload JSON. Trigger a real batch:
- Open a progressive archive in a private browser window;
- Use Load more or scroll until the next batch is requested;
- In browser developer tools, open Network and select the
.jsonrequest; - Confirm the response succeeds and contains the expected new items;
- Return to POM Cache → General → Progressive JSON tools;
- Check Progressive JSON Cache Contents.
The summary should show at least one cached JSON file if POM Theme marked the response cacheable and it passed the configured size limit.
Prove the second request is a hit
Copy the exact clean JSON request URL from the browser network panel. Request it again as a logged-out visitor.
Depending on the active layer, look for:
X-POM-Cache: Served static JSON cache from PHP; phase=early, orX-POM-Progressive-Archive-Cache: hit.
If direct Apache rules are already installed, neither PHP diagnostic header is expected because PHP may not run. Test Apache separately.
Do not add a cache-busting query parameter to this verification URL. Static JSON delivery requires an empty query string.
Verify that private sessions bypass early delivery
Repeat the request while logged into WordPress or while a WooCommerce cart/session cookie is present. The early PHP and recommended Apache paths should not return the shared file. Dynamic WordPress handling may still determine that the public response is safe, but the early file shortcut is intentionally conservative.
Add Apache only after the baseline works
If your origin uses Apache and you want delivery without PHP:
- Open POM Cache → Advanced → Progressive JSON Apache rules;
- Review Serve JSON cache files directly with Apache;
- Adapt the generated paths when the document root, cache location, or multisite mapping differs;
- Place the reviewed block before the WordPress rewrite block;
- Verify public, authenticated, translated, and multisite routes.
POM Cache displays rules but never writes .htaccess for you.
Expected result
After a successful rollout:
- the first eligible batch is dynamic;
- JSON writes stores it;
- the second clean request is served by the earliest available valid layer;
- authenticated and cart sessions bypass early shared delivery;
- automatic purges, if enabled, remove JSON after their matching content events;
- HTML cache settings and files remain independent.
If the count stays at zero or every request remains dynamic, use Troubleshoot progressive JSON caching. Do not enlarge the maximum file size until you have measured the actual response and ruled out a generation or permissions problem.