Page cache plugins
4 min read
A page cache stores finished pages. When you change something that appears on many pages (a phone number in Global Data, an options page value, a field group), the cached pages would keep showing the old value. Mass Custom Fields therefore asks your cache plugin to clear its pages after such changes. This is free and on by default.
Supported caches
The plugin calls only each product's public purge function or action. A cache is used only while it is active.
Cache | Purging a list of URLs | Purging everything |
|---|---|---|
WP Rocket |
|
|
LiteSpeed Cache | one |
|
W3 Total Cache |
|
|
WP Super Cache |
|
|
WP Fastest Cache | clears everything (it documents no per-URL purge) |
|
SiteGround Speed Optimizer |
|
|
Breeze | clears everything (no per-URL action) |
|
WP Engine | clears everything | its memcached and Varnish purge |
Several active caches are all asked. Cloudflare (including APO) and Kinsta have no public purge function this plugin can call and are not supported; Cloudflare APO normally follows your page cache plugin's purge.
What triggers a purge
Change | What is cleared |
|---|---|
An options page is saved, or an options value is written with | Everything |
Global Data is saved | Everything |
A field group is created, changed or deleted | Everything |
A post value is written with | That post's URL |
Programmatic SEO: a run finishes with created, updated or removed pages; generated pages or a task are deleted; a page template post is saved | Everything |
Programmatic SEO: a single page is edited, enriched by AI or its row changes | That page's URL (everything when the page is not known) |
Programmatic SEO: a page is converted into a post | That post's URL |
Not triggered by this plugin: saving a post on the normal edit screen. Cache plugins already clear a post when it is saved, so only the plugin-wide changes above need this help. A field group only changes (and clears) when you save the group itself, not when editors save posts.
A front-end page that prints a field of the signed-in visitor through a wp.user_… variable is flagged as not cacheable (DONOTCACHEPAGE and no-cache headers), so a cache does not keep one person's data for everyone.
How requests are sent
- Requests are collected during the request and sent once when it ends, so saving 500 items clears the cache once, not 500 times.
- URLs are de-duplicated. Only
httpandhttpsaddresses are used. - A request for everything wins over a list of URLs.
- More than 200 URLs are turned into one purge of everything, which is cheaper and safer.
- If an adapter fails (for example the cache plugin changed its API), the error is logged under WPM Fields › Settings › Health and the other caches are still cleared. A failing cache never breaks the save that triggered it.
Settings
Open WPM Fields › Settings › General. The Page caches card has:
Control | Default | Effect |
|---|---|---|
Clear page caches after changes | On | Asks your cache plugin to clear its pages after options pages, Global Data, field groups or generated pages change. Off stops all automatic purging. |
Detected: | One badge per active supported cache, or "No supported cache plugin is active." |
Save the settings after changing the toggle.
For developers
Hook | Type | Purpose |
|---|---|---|
| action | Request a purge: pass a URL or a list of URLs; pass nothing (or an empty list) for everything. |
| action | Request a purge of one post's permalink (post id). |
| action | Fires after the batch was sent: the URLs and |
| filter | Overrides the setting ( |
| filter | Add or remove cache adapters (objects implementing the plugin's |
Troubleshooting
- The cache is not cleared after I changed a field value on a post. That is left to the cache plugin, which clears a post on save. Check that the cache plugin does so, or call
do_action( 'wpmcf/cache/purge_post', $post_id ). - "No supported cache plugin is active." Your cache is not on the list above, or it is inactive. Server-level caches (Cloudflare, Kinsta, Nginx FastCGI cache) must be purged by their own tools.
- Pages are still stale after a change. A browser cache or a CDN in front of the page cache may hold a copy. Check WPM Fields › Settings › Health for a logged adapter error, and make sure the toggle is on.
- Purges are too aggressive. A change to a field group clears everything on purpose. Turn the toggle off if you prefer to clear the cache yourself.
Still stuck? Contact support