WP-Cache upgraded
Dreamhost has been running kinda slow recently. So I took the time to figure out why my wp-cache wasn’t working. WP-Cache is a WordPress plugin that caches database calls so that WordPress runs way faster. Instead of it doing about 60 database queries to fetch all the blog info, it looks in the cache and if the page has already been created, it serves it as a flat text file.
It didn’t work correctly… The first time I’d go to a blog page, I would see a blank page. The second time it worked fine. I found some advice in a comment on the author’s website to fix this problem.
The advice is:
To fix the blank page issue modify wp_cache_ob_end() in wp-cache-phase2.php to use ob_end_flush() instead of ob_end_clean(). Works for a setup using PHP 5.1.2, MySQL 5.0.18, WP 2.01 and WP-Cache 2.0.17.
So I went to the wp-cache-phase2.php file and changed
ob_end_end();
if ($new_cache) {
…
to
ob_end_flush();
if ($new_cache) {
…
It works :-)
I’m running wp-cache 2.0.17 on WordPress 1.5.2
Thanks! I was having just the same problem. This fix worked perfectly on WordPress 2.