Changes To WordPress Object Caching In 2.5

Jacob SantosFuncDoc notes:

The WordPress Object Cache changed in WordPress 2.5 and removed a lot of file support from the code. This means that the Object Cache in WordPress 2.5 is completely dependent on memory and will not be saved to disk for retrieval later. The constant WP_CACHE also changed its meaning.

I’ve just started using the object cache and I’m happy with how it works now, so these changes are somewhat concerning. On the other hand, I’m confident that I’ll see even more performance gains once I get my head around the new cache and figure out how to implement it.

Extra: Peter Westwood’s Cache Inspect looks useful.

5 Comments

  1. Actually, if you use the functions, you will have no problems, a few functions were removed, but all of the functions that plugin authors and core uses are still there and will remain. The only functionality that was removed was the enable cache and disable cache constants, so you can only disable the cache by using the new constant and replacing the current cache.

    By using the caching functions you are doing your users a favor, so keep up that good work!

  2. @Jacob Santos: I’ll definitely continue to code for them, but my concern is on the sysadmin side. The disk-based system is easy (if obviously not as efficient as a persistent memory-backed cache). I just need to learn more about that part.

  3. I found some problem in using Object Cache in WordPress 2.5.

    I have use the function wp_cache_set to cache the object, then I use the function wp_cache_get to get the object, but it return false.

    the cache function in my plugin works in WordPress 2.3, but it doesn’t work on WordPress 2.5

    can you help me to have a look my plugin?
    my plugin is http://wordpress.org/extend/plugins/top-first-commentors/

    thanks in advance :-)

  4. I will say, that it appears that you are setting the top commentors after you call the get cache function. Following the logic, your plugin would preform best with disk caching where it would just pull from that.

    I would keep it like that or use another caching plugin. Currently, it appears that you are caching it to memory after you try to get it, which doesn’t help on the next page load when it must still preform the SQL query.

  5. I just finished posting about the changes to the WP object caching system, including a history of WordPress’s caching abilities and memory-based extensions to the WP object cache that are WP 2.5 compatible… Hopefully it’ll provide some further insight into the matter: http://neosmart.net/blog/2008/wordpress-25-and-the-object-cache/


Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

fkhj tk (180) - w v s s fkhj (118) - wordpress 2.5 cache (55) - s;s fkhj (37) - w,v fkhj (37) - wcv fkhj (34) - wordpress 2 5 cache (32) - w v s fkhj (32) - w v fkhj (29) - www.3 pic.com (29) - wordpress object cache (22) - fkhj (20) - wordpress (17) - www.3.pic.com (14) - wordpress disable cache (12) - wordpress 2 5 performance (12) - www.3pic.com (12) - w,v fkhj s;s (11) - fkhj s;s (11) - w,v s;s fkhj (11) - wordpress 2.5 caching (10) - w v s s uvfd (10) - wordpress 2.6 object cache (10) - wp-cache wordpress 2 5 (8) - WP Object Cache (8) - wordpress 2.6 cache (8) - fkhj tk s;s (7) - sms fkhj (7) - wordpress 2 5 wp-cache (7) - turn off caching in wordpress (7) - Enable the WordPress Object Cache (7) - 3 pic.com (7) - wp-cache 2 5 (6) - wp-cache 2.5 (6) - wordpress feed cache (6) - disable cache in wordpress (6) - wordpress post object (6) - Wordpress turn off caching (5) - wordpress bookmark object (5) - vs s fkhj (5) - wordpress 2 5 enable cache (5) - s;s fkhj tk (5) - Wordpress 2 5 Caching (5) - wordpress persistent cache (5) - wordpress 2.7 object cache (5) - wordpress cache 2.5 (5) - wordpress wp_cache (5) - wordpress 2 5 (5) - w,v.fkhj.s;s (5) - enable wordpress cache (5) - wordpress rss feed cache (4) - 3pic xxl (4) - wordpress cache rss (4) - wp_cache wordpress 2.6 (4) - wp-cache wordpress 2.5.1 (4) - cache wordpress 2.5 (4) - wordpress cache removed 2.5 (4) - wordpress Object not found! (4) - wordpress $post object (4) - wordpress object cache 2.6 (4) - wordpress 2.5 performance (4) - wordpress 2.5 object cache (4) - wordpress turn caching off (4) - turn off caching wordpress (3) - wordpress persistent object cache (3) - wordpress disable rss cache (3) - 3.PİÇ.COM (3) - wordpress cache url (3) - fkhj wp (3) - enable cache wordpress (3) - enable cache wordpress 2.6 (3) - wordpress turn off cache (3) - how to disable wp-cache in wordpress 2.5.1 (3) - Persistent Object Cache wordpress (3) - turn wordpress cache off (3) - wordpress 2.5.1 cache (3) - caching wordpress 2.5 (3) - s;s uvfd (3) - wordpress 2.5 disk cache (3) - enable wordpress object cache (3) - cache: cache:www.3pic.com (3) - sql query cache wordpress 2.6 (3) - wordpress enable object cache (3) - wp cache 2.5 (3) - wordpress rss cache (3) - wordpress cache turn off (3) - wordpress object cache 2.5 (3) - turn off wordpress cache (3) - wcv fkhj s;s (3) - WordPress RSS Caching (3) - wordpress disk caching (3) - 3 pic (3) - wordpress cache function (2) - using caching in wordpress plugins (2) - ;s fkhj (2) - wordpress disable rss (2) - probleme wordpress 2.51 permalink memory (2) - turning on caching in wordpress (2) - 3pic.com (2) - wp_cache plugin (2) - wordpress 2.5 cache plugin (2) - enable wp object cache (2) - where do rss feeds cache wordpress (2) - wordpress 2.5.1 speed (2) - wordpress cache enable 2.6 (2) - wp object cache 2.7 (2) - wp_cache disk (2) - w,v s;s fkhj tk (2) - wp_cache doesn't work (2) - s;s;fkhj (2) - turn on caching in wordpress (2) - wcv fkhj [lgj (2) - wp 2.5 Cache (2) - enable cache in wordpress 2.5 (2) - wordpress cache plugin (2) - wp-cache for 2.6.1 wordpress (2) - z;v fkhj (2) - wordpressmu 2.6 object cache (2) - www.3.pic.com. (2) - fkhj s s (2) - wordpress comment object (2) - wp 2.7 object cache (2) - wordpress object-cache (2) - www.3 pic com (2) - fkhj 2 (2) - wp_cache_get wordpress 2.5 (2) - wordpress Cache SQL (2) - wordpress object not found (2) - wordpress Caching dont work (2) - w v fkhj s;s (2) - caching for wordpress 2.5 (2) - wordpress cache off (2) - wordpress cache rss feed (2) - wp_cache not persistent (2) - wordpress how to cache rss (2) - wordpress turn on cache (2) - wp object cache 2 5 (2) -