boakes.org

WordPress with Page Cacheing

A small improvement to this site – page cacheing using WP-Cache-2.

I’ve seen a 240% increase in traffic this month (on top of 20% last month and 240% the month before that, and whilst bandwidth is not an issue, the poor web server needs a helping hand to ensure everything runs nicely. Additionally, I’m one of the maintainers of the other sites hosted by the machine so it’s a bit of pro-active management.

Adding a cache to wordpress reduces load in several ways –

  1. less php code has to run in order to generate the page, this reduces load on the server.
  2. fewer SQL queries are run in order to retrieve the content from the DB, so that server is happier.
  3. there’s less network traffic between the web server and the DB server – ok this is fairly negligible anyway, but it all helps.

When content or comments are added the relevant cached pages are flushed so that the next reader gets the freshest page and thereafter that page remains cached until it needs updating again.

The upshot is that page access is significantly faster; in some (worst) cases it’s down from a five second generation time to sub 0.1 seconds.