WordPress plugin intelligence profile

API Cache Pro

This plugin enables caching for the WordPress REST API to improve performance. Once enabled you can modify the basic settings via the Customizer.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 5.2
Current version0.0.4
WordPress coverageTested up to WordPress 5.2
Minimum stackWP 5.0 · PHP 7.0
Directory statusactive
Last directory update18 Apr 20224y ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records API Cache Pro version 0.0.4 as active, updated 4y ago and tested up to WordPress 5.2.

Overview

About this plugin

This plugin enables caching for the WordPress REST API to improve performance. Once enabled you can modify the basic settings via the Customizer.

Customizer Options:

  • Disable Cache (Default: Disabled)
  • Set Default Cache Timeout (Default: 300)

Request Headers

Several Headers are added to all the API Requests. This plugin will also modify the Cache-Control header as well. Here is an example of the available custom headers.

X-API-CACHE-PRO: Cached X-API-CACHE-PRO-EXPIRES: January 20, 2019, 12:39 AM UTC X-API-CACHE-PRO-EXPIRES-DIFF: 5 mins X-API-CACHE-PRO-KEY: api_cache_pro_78be25416f69cd3a885dcf14017a0691

  • X-API-CACHE-PRO – Displays Cached, or Not Cached.
  • X-API-CACHE-PRO-EXPIRES – Displays the date/time the cache is set to expire.
  • X-API-CACHE-PRO-EXPIRES-DIFF – Displays the difference from current time to the time cache is set to expire.
  • X-API-CACHE-PRO-KEY – Displays the key used for the cache.

This plugin offers several filters so you can disable these headers:

Filter

Type

Default

api_cache_pro_header

boolean

true

api_cache_pro_key_header

boolean

true

api_cache_pro_expires_header

boolean

true

api_cache_pro_expires_diff_header

boolean

true

api_cache_pro_control_header

boolean

true

api_cache_pro_max_age

integer

Default Timeout or 300 (5 Minutes)

api_cache_pro_s_max_age

integer

Default Timeout or 300 (5 Minutes)

You can use these filters to disable any of the headers. Here is an example to disable the Key Header.

/** * Disable API Cache Pro Key Header. * * @access public */ function disable_api_cache_pro_key_header() { return false; } add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );

Clearing Cache

The cache will automatically get cleared if you do any of the following:

  • Disable the Cache
  • Update the Default Cache Timeout Length
  • Update any post, page or custom post type.
  • Deactivate or Uninstall the plugin

You can skip that cache by adding the following param to any request:

`cache=disabled<pre><h3>WP-CLI Support</h3>

API Cache Pro offers wp-cli support to clear cache with the following command:

wp api-cache-pro delete

`

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • api cache pro
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 5.2

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 5.2.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to5.2
Minimum requirementsWordPress 5.0 · PHP 7.0
Update activity18 Apr 20224y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.