new
Headless
Introducing the Edge Cache Purge Library
Our new npm package enables selective edge cache purging for headless WordPress sites, allowing developers to clear specific pages or groups of pages instead of the entire cache.
Overview
Previously, purging the edge cache for headless WordPress sites on our platform was only possible at the environment level, which meant clearing all cached content indiscriminately at the edge.
While this approach ensured that content was refreshed, it also resulted in unnecessary purging of other assets, leading to inefficiencies.
WP Engine now provides a framework-agnostic npm package for purging the edge cache of your headless WordPress site at a granular level with
@wpengine/edge-cache
. Use case
Instead of purging the entire cache, you can execute the following:
- Purge individual pages by specifying their paths
- Purge groups of pages using custom cache tags
This package can be integrated into an API endpoint in your application, allowing selective edge cache purging triggered by various sources, such as WordPress plugins or hooks.
Documentation
For more details, examples and information about rate limits visit our documentation.