WordPress 2.5 Object Cache Improvements

March 20th, 2008

WordPress 2.5 and the Object Cache: This comprehensive article by Neosmart discusses the caching changes that are going into place with WordPress 2.5. The article has very pertinent links, explains the use and application of the various types of object caches in WordPress and how they are being changed and improved in this new version. I will not steal Neosmart’s thunder by revealing much here, but if you are interested in understanding the nuances, history and best practices of caching in WordPress (primarily Object Caching), head over to the link above.

Worthy of mentioning however, is that I have never used any type of caching on this blog beside the occasional testing of code and plugins. I love the dynamic nature of the content that I help create and I cherish the highly dynamic nature of WordPress. That is one of the properties of this excellent tool that attracted me to it in the first place. Every site that refers you here, every post you click on, every page you visit, every link you follow, every comment you make, every post you rate and every search you perform is recorded and is used in some way to provide you with a better browsing and reading experience. Even the ads are displayed according to your visiting habits and your participation on this blog (and I have Ozh to thank for much of that code).




  1. Lazy (3 comments.) says:

    It`s a really great article from Neosmart. Peter, he means, that caching makes the site not really dynamic anymore in some cases.

    thanks for the link, i enjoyed reading the article.



  2. Peter (5 comments.) says:

    Thanks for the link – I had no idea that WP could be used with plugins to provide support for memcache to use the memory as the object cache. Should definitely help sites cope with the Digg effect, etc.

    I’m a bit confused by your comment about not having used caching and dynamic content. What do the two have to do with one another?

  3. Angels says:

    Many thanks for the link to Neosmart’s article on cashing.
    As you said it’s really helpful for “understanding the nuances, history and best practices of caching in WordPress”, and that was exactly what I needed to read. Thanks again.

  4. Mark Ghosh (386 comments.) says:

    Peter: Since cached content is not generated for every user, it lacks the personalization that can only be generated by dynamic content. I can only make changes to what I display if the content I am sending to you is generated with the latest information and is not cached from previous visits by others.

  5. Mahmoud Al-Qudsi (2 comments.) says:

    Thanks for the links, Mark.

    I just want to point out that with Object Caching (verses whole-page HTML caching) it is possible to serve personalized content. You just extend each key with the user id, and so each time a call to an object for the same person is made it won’t have to re-create the stuff…

    It’s not exactly the easiest trick in the book, but it can really help if your site is on Slashdot, etc. often; and it’s one of the reasons WP’s object cache is so much better and more flexible than the counterparts (à la Movable Type or the WP Super-Cache).

  6. Mark Ghosh (386 comments.) says:

    Neosmart: I should have mentioned in my comment that it is possible to serve certain types of personalized content even with Object and HTML caching but the code is not for the faint of heart and is not worth the effort in many cases.

  7. Carson (46 comments.) says:

    Forget the advantages and disadvantages of object caching. What I want to know is how Lazy responded to Peter’s question when it was posted an hour later than Lazy’s answer. He might be lazy but he is apparently very intuitive.

  8. Mark (386 comments.) says:

    Carson: There is some oddness in the comments due to the server. We added a timeserver that changed the time in between the posting of the comments. This should be fixed now.

  9. Mahmoud Al-Qudsi (2 comments.) says:

    Mark, if you sort comments in your theme by ID instead of date, that should address the problem.

  10. Mark Ghosh (386 comments.) says:

    Better? :)

  11. Jason (75 comments.) says:

    This is a pretty good article that outlines some of what I’ve been curious about with WordPress 2.5. I’m looking forward to the final release and a quick 2.5.1 so that I can update my sites and take advantage of some of the newer features and strengths :)

  12. Lazy (3 comments.) says:

    faster than i used to be.. ;) I`m running on trunk and it really works like a charm now.. with eaccelerator obj. cache (rev 240 (the newest..)) and wp super cache.. got no errors and wordpress 2.5 is really a big deal. i`m looking fordward to 2.6 :)

Obviously Powered by WordPress. © 2003-2013

page counter