Memcached Backend

December 23, 2005

Memcached is a distributed memory object caching system. WordPress 2.0 can make use of memcached by dropping in a special backend for the WP object cache. The memcached backend replaces the default backend and directs all cache requests to one or more memcached daemons. You must have a memcached daemon running somewhere for this to work. Unless you’re managing the server on which your blog is running, you probably can’t run a memcached daemon, making this backend useless to you. The memcached backend is targeted at ISPs and those running WPMU. If you are using WPMU and distributing DB requests across multiple servers, memcached will come in very handy. Using memcached for a single blog isn’t really worth it. In my tests, it was sometimes slower than using the default object cache backend.

To install, copy object-cache.php and memcached-client.php to your wp-content/ directory.

To configure, define $memcached_servers in wp-config.php. This is an array of host and ports to which to connect. By default, the backend attempts to connect to port 11211 on the localhost.

Example server config:

$memcached_servers = array('192.168.1.1:11211', '192.168.1.2:11211');

Entry Filed under: WordPress. .

2 Comments Add your own

  • 1. Rauru Blog » Blog A&hellip  |  December 23, 2005 at 8:58 pm

    [...] Ryan on WordPress にて、WordPress で memcached をサポートするためのファイルが公開されてます。 [...]

  • 2. Aaron Brazell  |  May 26, 2006 at 12:07 pm

    Ryan,

    How well do you find this works? I remember the conversation coming up on one of the mailing lists but I can’t recall if it ended up panning out as a valuable option. I’m thinking this might work well for our environment (3 servers, faux-load balanced, and a separate database server, 125+ WP-powered blogs).

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Archives

Links

Recent Comments

frankp on Rewrite Rule Feedback
Jason on WordPress.com on Twitter
Twittering follow-up… on WordPress.com on Twitter
another wish that wo… on WordPress.com on Twitter
albaran on New Importers

Meta