The Convergence Cache module gives every site one cache-clearing interface regardless of host. This guide covers how a hosting provider is detected, how the module resolves which cache managers to use, and how to clear caches from PHP, REST, or the admin bar.
Host detection
Mantle\Helper\HostingProvider::detect_provider() sniffs host-specific markers in a fixed order and returns the first match, or unknown.
Detection markers
detect_provider(). The first match wins.-
wpenginestring -
WP Engine. Detected when the
is_wpe()function exists and returns true. -
pressablestring -
Pressable. Detected when the
IS_PRESSABLEconstant is defined and truthy. -
cloudwaysstring -
Cloudways. Detected when
IS_CLOUDWAYSis defined and strictly equal to true. -
pantheonstring -
Pantheon. Detected when the
PANTHEON_ENVIRONMENTconstant is defined, whatever its value. -
unknownstring -
No marker matched. Host-specific purging is unavailable; generic layers still work.
No fields match this filter.
Detection to purge
Verify what a site thinks it is
wp eval 'echo "detected: " . \Mantle\Helper\HostingProvider::detect_provider() . PHP_EOL;'
wp eval '$s = new \Mantle\Model\Settings(); echo "stored: " . var_export( $s->get_setting( "hosting_provider" ), true ) . PHP_EOL;'detected: unknown
stored: ''
That output is from a local development site, which matches no host marker. A mismatch between the two lines on a production site is the signal to correct the setting.
Cache layers and routes
The module exposes a route per layer, plus host-specific purge routes. All require the convergence_cache module to be enabled.
| Layer | Route | Capability |
|---|---|---|
| Object cache | /mantle/v1/cache/clear/object | mantle_clear_cache_object |
| Page cache | /mantle/v1/cache/clear/page | mantle_clear_cache_page |
| Edge or CDN | /mantle/v1/cache/clear/edge | mantle_clear_cache_edge |
| Everything | /mantle/v1/cache/clear/all | mantle_clear_cache_all |
| Pressable | /mantle/v1/cache/clear/pressable | — |
| WP Engine | /mantle/v1/cache/clear/wpengine | — |
| Pantheon | /mantle/v1/cache/clear/pantheon | — |
| Cloudflare | /mantle/v1/cache/clear/cloudflare | — |
/wp-json/mantle/v1/cache/clear/page
Accept application/jsonContent-Type application/jsonX-WP-Nonce REPLACE_WITH_REST_NONCE{
"url": "https://example.com/about/"
}
{
"success": true
}Providers and cache managers
The module separates two concepts, which is worth knowing when reading the source:
Providers versus cache managers
includes/Modules/Convergence_Cache/.-
Providersstring -
Describe a platform and what it supports. Implementations: Cloudflare, Cloudways, Pantheon, Pressable, WPEngine, WPRocket. Each implements
Cache_Provider_Interface. -
Cache managersstring -
Perform the actual purge. Implementations: Cloudflare_API, Pantheon_Native, Pressable_API, Pressable_Plugin, WPEngine_Native. Each implements
Cache_Manager_Interface.
No fields match this filter.
Note that Pressable has two managers — Pressable_API and Pressable_Plugin — because the purge can go through the hosting API or through Pressable's own plugin depending on what is available.
-
Convergence_Cache_Module.php -
Providers/-
Cache_Provider_Interface.php -
Cache_Provider_Abstract.php -
Cloudflare.php -
Cloudways.php -
Pantheon.php -
Pressable.php -
WPEngine.php -
WPRocket.php
-
-
Cache_Managers/-
Cache_Manager_Interface.php -
Cache_Manager_Abstract.php -
Cloudflare_API.php -
Pantheon_Native.php -
Pressable_API.php -
Pressable_Plugin.php -
WPEngine_Native.php
-
-
API/REST/-
Cache_Purge_REST_Controller.php -
Module_Settings_REST_Controller.php
-
-
Helpers/-
Cache.php
-
Cloudflare configuration
Cloudflare is the one provider needing credentials in Mantle's own settings.
Cloudflare settings keys
mantle settings option.-
cloudflare_cache_enabledboolean -
Enables the Cloudflare integration.
-
cloudflare_api_keystring -
Cloudflare API key. A credential stored in a WordPress option.
-
cloudflare_email_addressstring -
Cloudflare account email, paired with the API key.
-
cloudflare_zone_idstring -
Zone to purge.
-
cloudflare_use_alt_accountboolean -
Use the alternate Cloudflare account credentials.
No fields match this filter.
Admin bar controls
cache_admin_bar_enabled adds cache controls to the admin bar for users holding the relevant capability, so editors can purge a page while viewing it. Toggle it at /mantle/v1/cache/admin-bar/enable.
Troubleshooting
Cache clearing is not working
Is the convergence_cache module enabled?
Does the stored hosting_provider match the actual host?
Does the user hold the capability for that cache layer?
Enable the module first
With convergence_cache disabled, none of the /cache/* routes exist and requests return 404 rest_no_route. Enable it, then retry.
Correct the hosting_provider setting
get_hosting_provider() reads the stored setting rather than detecting live, so a stale value sends purges to the wrong host. Compare detect_provider() against the stored value and update the setting.
Sync capabilities
POST to /mantle/v1/capabilities/sync so the mantle_clear_cache_* capabilities are written onto roles, then confirm the user’s role holds the one for that layer.
Check provider credentials
Module, host, and capability all look right, so the failure is most likely credentials or connectivity. For Cloudflare verify cloudflare_api_key, cloudflare_email_address, and cloudflare_zone_id. For Pressable and WP Engine confirm the host API or supporting plugin is reachable.
This answer needs a valid destination.
Edit the block and connect this answer to another question or outcome.
See also
- Settings reference — every cache key.
- REST API — the full route list.
- Troubleshooting.