Send a HTTP request with PURGE method on every post save (creation or update) to clean a service cache.
Useful if there is a web server in front of WordPress caching the responses. Please note that the web server must be properly configured to accept this type of request.
Works with multiple services at the same time.
- Download the plugin into your plugins directory.
- Enable in the WordPress admin dashboard.
The following must be added as environment variables:
- The origin of the service with
[SERVICE]_ORIGIN
.- Example:
API_ORIGIN
tohttps://api.acme.org
.
- Example:
- Configure with
PURGE_[SERVICE]_CACHE_ON_SAVE
to a boolean, like:- Example:
PURGE_API_CACHE_ON_SAVE
totrue
.
- Example: