WP-Cache 2.1
Several people have had problems with previous version of wp-cache. Others have complained that wp-cache didn’t work with Wordpress 2.1., which was not the real problem Jih-Kai Liang finally found the bug, thanks:
After some investigation today, I found out that the callback sequence in php5 are changed from php4.
In php5, wp_cache_shutdown_callback() is call when page shutdown, and in wp_cache_shutdown_callback() it calls ob_end_flush(). When you call ob_end_flush(), it calls wp_cache_ob_callback() to process the buffer(since we register it with ob_start()).
So we can see wp_cache_shutdown_callback() is call earlier, and later the ‘$meta_object = new CacheMeta;’ statement in wp_cache_ob_callback() overrides the $meta_object, so the saved meta is always empty.
In php4, though I don’t understand why, wp_cache_ob_callback() are get called first. Then wp_cache_shutdown_callback() will be called, so putting ‘$meta_object = new CacheMeta;’ in wp_cache_ob_callback() will lead to correct results.
That’s why php5 users are good with 2.0.21, but php4 users are good in 2.0.22.
The new 2.1 version solves this problem by moving the creation of the MetaCache obect to the start of the whole process.
It has been also tested in WP 1.5, WP 2.0 and WP 2.1 running PHP 4.3 and PHP 5.2 on Apache 1.3 and Apache 2.2, in different servers’s configurations (dedicated and Dreamhost).
So, I hope it would finally solve any outstanding problem. Enjoy it
Download version 2.1.0.
The wp-cache-2 page.