by Dan Collis-Puro on WordPress.org
Enables your blog to work properly with an nginx frontend static proxy cache. ASTRONOMICAL performance is yours!
Need for Speed?
This plugin handles the wordpress/php side of a statically cached nginx-fronted wordpress (or wordpress mu) site. It makes WordPress emit an “X-Accel-Expires: 0” header when a user is logged in or has taken actions that should cause them to get a customized page on your frontend. This – along with the nginx configuration below – will ensure logged-in users aren’t impacted by your static nginx cache.
Why would you want to statically cache wordpress with nginx?
We’ve been using a caching nginx proxy at the fairly busy blogs.law.harvard.edu since September, 2009. The results have been dramatic: we’ve halved the amount of RAM we need, doubled our outgoing network throughput (nginx is fast!) and have had essentially no significant load spikes.
Drawbacks
There are a few.
Notes
This plugin could be set up to allow you to manage caching policies entirely from a wordpress control panel. We’d do this by manipulating the timeout in the “X-Accel-Expires” header based on the type of resource that’s been requested.
It’d be nice to de-cache when pages change via some call from the backend to the nginx frontend.