Package that allows for controlling the edge cache on WP Engine Headless WordPress
To install the package, run:
$ npm install --save @wpengine/edge-cache
The following code purges paths from the edge cache:
import { purgePaths } from '@wpengine/edge-cache';
try {
const paths = ['/foo', '/bar']
await purgePaths(paths)
} catch (error) {
console.error(error)
}
purgePaths(paths: []string): Promise<void>
paths
: The paths that should be purged from the edge cache
purgeTags(tags: []string): Promise<void>
tags
: The tags that should be used to purge content from the edge cache
Error thrown when rate limit exceeded
To report security vulnerabilities please see https://wpengine.com/security/.
Bugs can be reported using the live chat in the User Portal
MIT License © WP Engine