This plugin uses Varnish and ESI to cache the sidebar separately from the page and aggressively uses Purges so that you can set long expire times without worrying about comments and post edits not showing up immediately.
I did a presentation on the methodology behind this which explains how
the plugin works. Blog Post
Should you use this?
If you’re on a Virtual server, it is likely that you won’t be able to install
Varnish or run your site behind it. If you are able to run Varnish, the use
case for this plugin is a little different than WordPress-Varnish.
If you are trying to cache your site where your visitors are hitting one
or two pages and you don’t get many comments, WordPress-Varnish will result in faster pageloads.
If your site is dynamic and you receive a lot of comments, or, your visitors
are likely to surf multiple pages rather than a single landing page, using
ESI will probably provide enough benefit to make the plugin worthwhile for
Image used under Creative Commons License from Varnish Software.
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Appearance, Widgets, drag the ESI Widget to Sidebar 1
- Drag the Widgets that you want to display on your sidebar to the
newly created ESI Widget Sidebar.
- Settings, Varnish ESI Widget, Set the Server IP(s) that the plugin
needs to communicate with to purge.
- Make sure you have configured Varnish with the included default.vcl
or with one that you have created that allows the plugin to issue BANs.
Verify your ACL is set to allow purging.
- Why is this approach better than other caching systems?
The worst queries in WordPress are usually contained within the sidebar. If
your content is engaging and someone browses from one page to the next,
most caching plugins need to generate the page and sidebar on a fresh visit.
Since this plugin caches the sidebar separately using ESI, the only
queries executed on the second and successive pages is the page content –
not the sidebar.
- What Plugins break with this?
Any plugin that requires the page to load and not be served from cache
will break. Since your page might be served from Varnish, it will never
hit the backend server. Statistics plugins are generally affected, but
Google Analytics and Pikwik do work properly. Banner ad solutions also
depending on a pageload.
WP Greet Box and WP Post Views are known to break with caching.
Contributors & Developers
“Plugin Name: WordPress + Varnish ESI caching” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- updated VCL to actually parse for ESI
- fixed ESI handler path
- Initial release