WP-Optimize
95Get caching and more with this powerful cache plugin. Cache, optimize images, clean your database and minify f...
Automatically clear related pages from Pantheon's Edge when you update content. High TTL. Fresh content. Visitors never wait.
Pantheon Advanced Page Cache is a WordPress plugin designed for sites that require detailed control over their caching responses. It uses surrogate keys to tag responses based on the main WP_Query object, allowing for precise cache management. When WordPress data is modified, the plugin triggers a purge request for the relevant surrogate keys, ensuring that the cache remains accurate and up-to-date.
This plugin is suitable for developers and site administrators who need a more sophisticated caching solution that integrates with the WordPress REST API. Its ability to manage cache purging based on specific data changes makes it ideal for dynamic sites where content updates frequently.
Best for: This plugin suits developers and site administrators managing dynamic WordPress sites.
What it does well
Where it falls short
Pantheon Advanced Page Cache offers a detailed approach to caching for WordPress sites, particularly those needing fine control over cache purging. It may be beneficial for users with specific caching needs.
Pantheon Systems's own description of Pantheon Advanced Page Cache, lightly tidied.
For sites wanting fine-grained control over how their responses are represented in their edge cache, Pantheon Advanced Page Cache is the golden ticket. Here’s a high-level overview of how the plugin works:
WP_Query object to “tag” the response with identifers for the data used in the response. See the “Adding Custom Keys” section for including your own surrogate keys.Because of its surrogate key technology, Pantheon Advanced Page Cache empowers WordPress sites with a significantly more accurate cache purge mechanism, and generally higher cache hit rate. It even works with the WordPress REST API.
Go forth and make awesome! And, once you’ve built something great, send us feature requests (or bug reports).
Pantheon Advanced Page Cache makes heavy use of surrogate keys, which enable responses to be “tagged” with identifiers that can then later be used in purge requests. For instance, a home page response might include the Surrogate-Key header with these keys:
Surrogate-Key: front home post-43 user-4 post-41 post-9 post-7 post-1 user-1
Similarly, a GET requests to /wp-json/wp/v2/posts might include the Surrogate-Key header with these keys:
Surrogate-Key: rest-post-collection rest-post-43 rest-post-43 rest-post-9 rest-post-7 rest-post-1
Because cached responses include metadata describing the data therein, surrogate keys enable more flexible purging behavior like:
There is a limit to the number of surrogate keys in a response, so we’ve optimized them based on a user’s expectation of a normal WordPress site. See the “Emitted Keys” section for full details on which keys are included, and the “Adding Custom Keys” section following for information on how to add your own.
By default, Pantheon Advanced Page Cache generates surrogate keys based on an interpretation of the main WP_Query query object. Because WordPress sends headers before the page is rendered, you need to use the pantheon_wp_main_query_surrogate_keys filter to include additional surrogate keys for any data present on the page.
For example, to include surrogate keys for a sidebar rendered on the homepage, you can filter the keys using the is_home() template tag:
Other plugins for making sites fast.
Get caching and more with this powerful cache plugin. Cache, optimize images, clean your database and minify f...
All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...
Comprehensive image optimization with WebP, AVIF, Lazy Load, and more. Optimize images automatically for Faste...
Easy to use Under Construction Page & Coming Soon Page. Enable Under Construction Mode in seconds & sh...
Compress and optimize images, enable lazy load, serve WebP & AVIF, and speed up your site with a global im...
Speed up your website by using our WebP & AVIF Converter. Optimize images and serve WebP and AVIF images i...