Advanced Custom Fields (ACF) helps you easily customize WordPress with powerful, professional and intuitive fields. Proudly powering over…
About WP REST Cache
This plugin helps speed up the WordPress REST API by caching the responses, making it much faster. It offers caching of default and custom endpoints, automated and manual cache flushing, and the ability to specify cache timeout. Installation can be done from within WordPress or manually.Screenshots





Frequently asked questions
What is WP REST Cache?
What types of REST API endpoints can be cached?
How does WP REST Cache handle cache management?
How do I install WP REST Cache?
Can I change the cache timeout?
Changelog
2026.4.5
Release Date: November 30th, 2026
Security: Unauthenticated visitors could poison the cache with a query string that WordPress core reads differently than the cache key: the home URL was removed anywhere in the request URI (also inside parameter names and values) and bytes removed by URL sanitization were dropped from the cache key only. The home URL is now only removed from the start of the request URI, and requests whose query string does not match the cache key are no longer cached. It was reported by Kang MinSeok (AhnLab) through Patchstack. All existing caches are flushed on update.
Improvement: Responses without a type field (e.g. limited with _fields) now get the post type or taxonomy of the requested route as object type, so they are flushed when content of that type changes.
2026.4.4
Release Date: November 26th, 2026
Feature: Show an admin notice when many REST requests aren’t cached because they carry credentials (e.g. an Authorization header or HTTP authentication), explaining how to cache them. Added filters wp_rest_cache/credential_skips_notice_threshold and wp_rest_cache/credential_skips_sample_rate.
Improvement: When Authorization is a cacheable request header, requests where the web server handles the Basic authentication are now cached per set of credentials as well.
Improvement: Stored credentials in the Authorization and Proxy-Authorization request headers are masked in the wp-admin.
Improvement: Added a FAQ item on why REST requests are no longer cached since version 2026.4.0.
Fix: Typo in the plugin (de)activation notices.
2026.4.3
Release Date: November 23rd, 2026
Security: Unauthenticated visitors could poison the cache by sending a GET request with a request body (e.g. a JSON body) or a method override (_method parameter or X-HTTP-Method-Override header). WordPress core uses these to generate the response, but they were not part of the cache key, so the response was served to all visitors of that URL. It was reported by Kang MinSeok (AhnLab) through Patchstack. All existing caches are flushed on update.
Backwards compatibility: GET and HEAD requests with a request body, and requests with a method override, are no longer cached. For other request methods that are allowed to be cached (setting “Allowed request methods”) the request body is now part of the cache key, so requests with a different body no longer share a cache. The cache key of requests without a body is unchanged. The Endpoint_Api::save_cache() method now accepts the optional $server and $request arguments of the rest_pre_echo_response filter.
Feature: Added filter wp_rest_cache/skip_get_request_with_body to allow caching of GET and HEAD requests with a request body (cached per body).
2026.4.2
Release Date: October 29th, 2026
Fix: Caches that expired, or that were flushed and cleaned up, were never removed from the database, causing the caches table to grow indefinitely. A daily cron job now removes them (unless cache regeneration is enabled). It was reported by krstarica.
Improvement: The cache regeneration cron no longer loads the entire caches table into memory.
Feature: Added filters wp_rest_cache/purge_stale_caches, wp_rest_cache/stale_cache_grace_period and wp_rest_cache/max_purge_caches.
2026.4.1
Release Date: October 29th, 2026
Fix: Deleted caches that had been flushed and cleaned up before were never removed from the database, causing the caches table to grow indefinitely. Existing leftover caches are removed by the cleanup cron. It was reported by krstarica.
2026.4.0
Release Date: October 27th, 2026
Security: Responses generated for authenticated users (e.g. through Application Passwords or Basic auth) could be cached and served to unauthenticated visitors. Requests with an Authorization header and requests with context=edit are no longer cached, responses for authenticated users are only cached if the cache key is user specific, and nonce cached requests are now cached per session. All existing caches are flushed on update.
Feature: Added filter wp_rest_cache/cache_authenticated_response to allow caching of responses generated for authenticated users when the cache key is made user specific.
2026.3.1
Release Date: July 25th, 2026
Improvement: Make the mu-plugin use the same version as the main plugin.
2026.3.0
Release Date: July 24th, 2026
Fix: several small fixes and improvements.
Improvement: Add support for using regex inside wp_rest_cache/allowed_endpoints and wp_rest_cache/disallowed_endpoints filters.
2026.2.0
Release Date: May 19th, 2026
Fix: specified key was too long error.
Improvement: Extra filters and actions.
2026.1.3
Release Date: March 3rd, 2026
Fix: Prevent performance issue with hierarchical categories.
2026.1.2
Release Date: February 25th, 2026
Fix: Prevent PHP warnings.
Improvement: Add filter to disallow skip_cache parameter.
Improvement: Added error log if set_transient fails.
Improvement: Add support for flushing term cache when objects terms are modified. (Contribution by: Moshe Gross)
2026.1.1
Release Date: January 20th, 2026
Fix: A XSS vulnerability in the plugin was discovered and fixed. It was reported by Nguyen Ba Khanh.
Fix: Improved transition_post_status_logic. (Contribution by: Moshe Gross)
2026.1.0
Release Date: January 14th, 2026
Improvement: Only flush caches on meta update if filter returns true.
2025.2.0
Release Date: December 15th, 2025
Improvement: Also flush caches when only the (post) meta is updated.
Earlier versions
For the changelog of earlier versions, please refer to the changelog on Github.
