05.10.06
wp-cache
I wanted to speed things up a bit, so I looked into cache options for WordPress. Supposedly WordPress 2 (which I am using) has a built-in cache, but either it’s not working or it’s just not very effective, because this site was running a lot slower than I wanted it to.
There’s a plugin called wp-cache that I’d tried before but decided against because I was using some other plugins that shouldn’t be cached, such as wp-scrobbler. Since I’m no longer using those plugins, I decided to give wp-cache another try. Immediately, however, I ran into some problems, foremost of which was the fact that the first time I loaded any given URL, I got a blank page. Subsequent reloads were fine. Turns out the problem has to do with running the plugin under WordPress 2.0.2 on PHP 5; that combination apparently doesn’t work in the default setup. There is a fix, but it’s buried in the comments (#183, to be precise), so I figured I’d repeat it here in case any of my readers run into the problem.
To fix the problem, open up wp-cache-phase2.php in the wp-cache folder, find the wp_cache_ob_end() function definition, and change the ob_end_clean() function call to ob_end_flush(). In version 2.0.17 of the plugin, which is current as of this writing, the line that needs to be changed is #219.
The plugin makes a huge difference in response time, and should also make your web host happy, since it requires less CPU time and fewer database calls.

Fury’s Den » Blog Archive » WordPress 2.0.2 Cache Bug Said:
July 22, 2006 at 10:12 pm
[...] looked about for an answer, but it was sort of buried. Luckily, I found it at this blog on Acetylene.net. It looks like there’s an issue with PHP5.x and the wp-cache plugin. [...]