Looking at a WPMU Object Cache

In the good ol’ days WordPress came with a filesystem object cache but it was removed some time ago because it was a pain to maintain, and caused problems for some users, especially those using NFS. Nowadays there is an object cache built in, but the cache only survives for as long as a page is being served.
Other developers have taken up the challenge and produced object cache plugins to fill in the gap. There are the neosmart ones including a filesystem object cache and a memcached one (Read Andy’s notes before installing).

The neosmart filesystem object cache (and the others according to #988) don’t work correctly with WordPress MU so I dug up a patched version of the filesystem object cache I worked on a year ago to look for testers.

Download object-cache.txt, rename to .php and copy into wp-content/. It should start working automatically but if you don’t see files and directories in wp-content/cache/, make sure that directory is writeable by the webserver.

The neosmart version on which this one is based doesn’t handle switching blogs at all. Cache collisions occur with data from one blog’s options polluting the options in others. The version linked above should fix that but I’d appreciate some testing by others.

Oh, check out WordPress MU trunk now. I merged WP 2.8 beta1 and I’m fixing bugs. Please install and try it out on a test server! The get_option() and related code is using the same code as WordPress.org which is one of the main reasons I went digging into the object cache. It leans a lot more on the cache than previously. Please test!

21 thoughts on “Looking at a WPMU Object Cache

  1. hey donncha, did you ever get around to check out the object cache, that uses eaccelerator as the backend? just google for: eaccelerator object cache murmatrons

    and you’ll find it. I already tried psoting here with the link but it seems I get filtered as a spammer?

  2. Ovidiu – your comments were eaten by Akismet! Sorry!

    Did you try that object cache with MU? I haven’t tried it but it’s easier to poison the cache in MU because of the blog switching it does.

    I’d say the comments were eaten because that url is on a dynamic hostname. Wish he’d register his own domain or use WordPress.com/.org so I could stumble his site. I’ve tried several times..

  3. 🙂 I have been happily using this eaccelerator compatible version for quite a while, never noticed any problems. Cache works quite good and in combination with the mod of your wp super cache plugin he made, I fully trust eaccelerator .-)

  4. any feedback on your survey? is this object cache working? is there another one? whats your opinion?

    1. No feedback unfortunately. It works fine on my test server but all I’ll guarantee is that it takes up space on your server. 🙂

  5. Hello Donncha, is this drop-in object-cache.txt still working with a multisite WP 3.0 installation? When I rename the file to object-cache.php and put it into wp-content, I see this message in my “Manage Plugins”-section:

    “The plugin 0 has been deactivated due to an error: Plugin file does not exist.”

    When I remove the drop-in, the message is no longer displayed.

  6. I’ve got the same problem Jan and oddly enough the performance issues I have with the back end go away if I remove the object-cache drop-in

  7. Hi,
    nice post
    In your version of object-cache, you used this line
    $data = unserialize(serialize($data));
    I really don’t get it why u r serializing and unserializing the $data in the same step, what changes will happen to $data after this step.

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close