by Acato
4.9 (42 reviews)
WP REST Cache
Enable caching of the WordPress REST API and auto-flush caches upon wp-admin editing.
Tested up to WP 6.8 (Current: 6.9)
v2026.1.0
Current Version v2026.1.0
Updated 6 days ago
Last Update on 14 Jan, 2026
Synced 14 hours ago
Last Synced on
Rank
#1,869
—
No change
Active Installs
10K+
—
No change
KW Avg Position
77.3
+0.3 better
Downloads
346.6K
+22 today
Support Resolved
50%
—
No change
Rating
98%
Review 4.9 out of 5
4.9
(42 reviews)
Next Milestone 20K
10K+
20K+
368
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro
Unlock Exact Install Count
See the precise estimated active installs for this plugin, calculated from real-time ranking data.
- Exact install estimates within tiers
- Track install growth over time
- Milestone progress predictions
Need 4,544 more installs to reach 20K+
Rank Changes
Current
#1,869
Change
Best
#
Downloads Growth
Downloads
Growth
Peak
Upgrade to Pro
Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.
Upgrade NowReviews & Ratings
4.9
42 reviews
Overall
98%
5
38
(90%)
4
3
(7%)
3
1
(2%)
2
0
(0%)
1
0
(0%)
Tracked Keywords
Showing 4 of 4| Keyword | Position | Change | Type | Updated |
|---|---|---|---|---|
| rest cache | 29 | — | Tag | 16 hours ago |
| wp-rest-api | 69 | — | Tag | 16 hours ago |
| rest | 82 | — | Tag | 16 hours ago |
| cache | 129 | — | Tag | 16 hours ago |
Unlock Keyword Analytics
Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.
- Full keyword position tracking
- Historical ranking data
- Competitor keyword analysis
Support Threads Overview
Resolved
Unresolved
2
Total Threads
1
Resolved
1
Unresolved
50%
Resolution Rate
Track This Plugin
Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.
Start Tracking FreePlugin Details
- Version
- 2026.1.0
- Last Updated
- Jan 14, 2026
- Requires WP
- 4.7+
- Tested Up To
- 6.8
- PHP Version
- 7.0 or higher
- Author
- Acato
Support & Rating
- Rating
- ★ ★ ★ ★ ★ 4.9
- Reviews
- 42
- Support Threads
- 2
- Resolved
- 50%
Keywords
Upgrade to Pro
Unlock keyword rankings, search positions, and detailed analytics with a Pro subscription.
Upgrade NowSimilar Plugins
WP Adminify – White Label WordPress, Admin Menu Editor, Login Customizer
7K+ installs
#2,735
Master Addons For Elementor - White Label, Free Widgets, Hover Effects, Conditions, & Animations
40K+ installs
#929
WP-Sweep
100K+ installs
#284
SSL Insecure Content Fixer
100K+ installs
#292
TinyPNG – JPEG, PNG & WebP image compression
100K+ installs
#307
Frequently Asked Questions
Common questions about WP REST Cache
/**
* Register the /wp-json/acf/v3/posts endpoint so it will be cached.
*/
function wprc_add_acf_posts_endpoint( $allowed_endpoints ) {
if ( ! isset( $allowed_endpoints[ 'acf/v3' ] ) || ! in_array( 'posts', $allowed_endpoints[ 'acf/v3' ] ) ) {
$allowed_endpoints[ 'acf/v3' ][] = 'posts';
}
return $allowed_endpoints;
}
add_filter( 'wp_rest_cache/allowed_endpoints', 'wprc_add_acf_posts_endpoint', 10, 1);
Please note: the WP REST Cache plugin will try to detect relations in the cached data to automatically flush the cache when related items are edited, but this detection is not flawless so your caches might not be flushed automatically.
Can I unregister an endpoint so it is no longer cached?
Yes you can! Use the hook wp_rest_cache/allowed_endpoints like this:
/**
* Unregister the /wp-json/wp/v2/comments endpoint so it will not be cached.
*/
function wprc_unregister_wp_comments_endpoint( $allowed_endpoints ) {
if ( isset( $allowed_endpoints[ 'wp/v2' ] ) && ( $key = array_search( 'comments', $allowed_endpoints[ 'wp/v2' ] ) ) !== false ) {
unset( $allowed_endpoints[ 'wp/v2' ][ $key ] );
}
return $allowed_endpoints;
}
add_filter( 'wp_rest_cache/allowed_endpoints', 'wprc_unregister_wp_comments_endpoint', 100, 1);
Can I force a call to the REST API to not use caching?
Yes you can! Add the GET-parameter skip_cache=1 to your call and no caching will be used.
On the cache overview page I see the object type is 'unknown'. Can I help the WP REST Cache plugin to detect the object type correctly?
Yes you can! Use the hook wp_rest_cache/determine_object_type like this:
function wprc_determine_object_type( $object_type, $cache_key, $data, $uri ) {
if ( $object_type !== 'unknown' || strpos( $uri, $your_namespace . '/' . $your_rest_base ) === false ) {
return $object_type;
}
// Do your magic here
$object_type = 'website';
// Do your magic here
return $object_type;
}
add_filter( 'wp_rest_cache/determine_object_type', 'wprc_determine_object_type', 10, 4 );
Can expired caches be automatically regenerated?
Yes they can! Go to Settings > WP REST Cache, on the Settings tab you can check Enable cache regeneration, this will activate a cron job which will check if there are any expired (or flushed) caches and regenerate them. Using the Regeneration interval you can determine how often this regeneration process should run. The Max number regenerate caches limits the number of regenerated caches per regeneration process, this is so your server doesn't get flooded with the regeneration calls.
Can I hide the 'Clear REST cache' in the wp-admin bar?
Yes you can! Use the hook wp_rest_cache/display_clear_cache_button like this:
function wprc_display_clear_cache_button( $show ) {
return false;
}
add_filter('wp_rest_cache/display_clear_cache_button', 'wprc_display_clear_cache_button', 10, 1);
Can I differentiate between caches based upon request headers?
Yes you can! There are two options for this:
1. Go to Settings > WP REST Cache and add Global cacheable request headers. This is a comma seperated list. These headers will be used for ALL endpoints.
2. Use the hook wp_rest_cache/cacheable_request_headers to specify per endpoint which request headers should be used. Like this:
function wprc_add_cacheable_request_headers( $cacheable_headers ) {
$cacheable_headers['wp/v2/posts'] = 'LANG';
return $cacheable_headers;
}
add_filter('wp_rest_cache/cacheable_request_headers', 'wprc_add_cacheable_request_headers', 10, 1);
* Register the /wp-json/acf/v3/posts endpoint so it will be cached.
*/
function wprc_add_acf_posts_endpoint( $allowed_endpoints ) {
if ( ! isset( $allowed_endpoints[ 'acf/v3' ] ) || ! in_array( 'posts', $allowed_endpoints[ 'acf/v3' ] ) ) {
$allowed_endpoints[ 'acf/v3' ][] = 'posts';
}
return $allowed_endpoints;
}
add_filter( 'wp_rest_cache/allowed_endpoints', 'wprc_add_acf_posts_endpoint', 10, 1);
Please note: the WP REST Cache plugin will try to detect relations in the cached data to automatically flush the cache when related items are edited, but this detection is not flawless so your caches might not be flushed automatically.
Can I unregister an endpoint so it is no longer cached?
Yes you can! Use the hook wp_rest_cache/allowed_endpoints like this:
/**
* Unregister the /wp-json/wp/v2/comments endpoint so it will not be cached.
*/
function wprc_unregister_wp_comments_endpoint( $allowed_endpoints ) {
if ( isset( $allowed_endpoints[ 'wp/v2' ] ) && ( $key = array_search( 'comments', $allowed_endpoints[ 'wp/v2' ] ) ) !== false ) {
unset( $allowed_endpoints[ 'wp/v2' ][ $key ] );
}
return $allowed_endpoints;
}
add_filter( 'wp_rest_cache/allowed_endpoints', 'wprc_unregister_wp_comments_endpoint', 100, 1);
Can I force a call to the REST API to not use caching?
Yes you can! Add the GET-parameter skip_cache=1 to your call and no caching will be used.
On the cache overview page I see the object type is 'unknown'. Can I help the WP REST Cache plugin to detect the object type correctly?
Yes you can! Use the hook wp_rest_cache/determine_object_type like this:
function wprc_determine_object_type( $object_type, $cache_key, $data, $uri ) {
if ( $object_type !== 'unknown' || strpos( $uri, $your_namespace . '/' . $your_rest_base ) === false ) {
return $object_type;
}
// Do your magic here
$object_type = 'website';
// Do your magic here
return $object_type;
}
add_filter( 'wp_rest_cache/determine_object_type', 'wprc_determine_object_type', 10, 4 );
Can expired caches be automatically regenerated?
Yes they can! Go to Settings > WP REST Cache, on the Settings tab you can check Enable cache regeneration, this will activate a cron job which will check if there are any expired (or flushed) caches and regenerate them. Using the Regeneration interval you can determine how often this regeneration process should run. The Max number regenerate caches limits the number of regenerated caches per regeneration process, this is so your server doesn't get flooded with the regeneration calls.
Can I hide the 'Clear REST cache' in the wp-admin bar?
Yes you can! Use the hook wp_rest_cache/display_clear_cache_button like this:
function wprc_display_clear_cache_button( $show ) {
return false;
}
add_filter('wp_rest_cache/display_clear_cache_button', 'wprc_display_clear_cache_button', 10, 1);
Can I differentiate between caches based upon request headers?
Yes you can! There are two options for this:
1. Go to Settings > WP REST Cache and add Global cacheable request headers. This is a comma seperated list. These headers will be used for ALL endpoints.
2. Use the hook wp_rest_cache/cacheable_request_headers to specify per endpoint which request headers should be used. Like this:
function wprc_add_cacheable_request_headers( $cacheable_headers ) {
$cacheable_headers['wp/v2/posts'] = 'LANG';
return $cacheable_headers;
}
add_filter('wp_rest_cache/cacheable_request_headers', 'wprc_add_cacheable_request_headers', 10, 1);
function wprc_change_settings_capability( $capability ) {
// Change the capability to users who can edit posts.
return 'edit_posts';
}
add_filter('wp_rest_cache/settings_capability', 'wprc_change_settings_capability', 10, 1);
Can I use WP CLI to flush caches from the command line?
Yes you can! Use the wp wp-rest-cache flush command to flush caches. Type wp wp-rest-cache flush --help to see all options.
Is Redis Object Cache supported?
We are using the WordPress transient API, so as long as you are using a Redis Object Cache plugin which enables Redis caching through the transients API it is supported.
How can I report security bugs?
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team helps validate, triage and handle any security vulnerabilities. Report a security vulnerability.
// Change the capability to users who can edit posts.
return 'edit_posts';
}
add_filter('wp_rest_cache/settings_capability', 'wprc_change_settings_capability', 10, 1);
Can I use WP CLI to flush caches from the command line?
Yes you can! Use the wp wp-rest-cache flush command to flush caches. Type wp wp-rest-cache flush --help to see all options.
Is Redis Object Cache supported?
We are using the WordPress transient API, so as long as you are using a Redis Object Cache plugin which enables Redis caching through the transients API it is supported.
How can I report security bugs?
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team helps validate, triage and handle any security vulnerabilities. Report a security vulnerability.