@wpengine/edge-cache

1.3.2 • Public • Published

Edge Cache

Package that allows for controlling the edge cache on WP Engine Headless WordPress

Install

To install the package, run:

$ npm install --save @wpengine/edge-cache

Usage

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)
}

API

purgePaths

purgePaths(paths: []string): Promise<void>

Options

paths: The paths that should be purged from the edge cache

purgeTags

purgeTags(tags: []string): Promise<void>

Options

tags: The tags that should be used to purge content from the edge cache

RateLimitError

Error thrown when rate limit exceeded

Report an issue

To report security vulnerabilities please see https://wpengine.com/security/.

Bugs can be reported using the live chat in the User Portal

License

MIT License © WP Engine

Readme

Keywords

none

Package Sidebar

Install

npm i @wpengine/edge-cache

Weekly Downloads

1,621

Version

1.3.2

License

MIT

Unpacked Size

20.2 kB

Total Files

9

Last publish

Collaborators

  • marcin.szarek
  • ciaranshan-wpe
  • daraghl
  • martinmcd
  • nebula-automated
  • diarmuid-wpe
  • sebastianp-wpe
  • konrad-glowacki