Before begin I've to warn the reader: watch out the d!
On a single web server (CentOS 6.3) using php-5.3.3 I've a bunch of unrelated wordpress sites (3.5), each one has its own DB (Mysql5.1) so the table_prefix is the same ("wp_").
To speep-up the wordpress I think to APC for the code and a memcache backend for the data, so on my web server I've compile & install libmemcached-1.0.15 and (using "pecl install") php-pecl-memcached 2.1.0 (pay attention to the ending "d"). As wp-plugin I used "memcached redux".
On two different servers (CentOS 6.3) I've compiled & installed memcached-1.4.15 backend daemon.
First I login on wp.first-domain.com and everything is fine. When I try to log on on wp.second-domain.net I found myself redirect on wp.first-domain.com!
If I clean the memcached cache I can login on wp.second-domain.net, but then every other wp I try to login redirect me on wp.second-domain.net.
In my wp-config.php I use these settings:
// server list definition $GLOBALS['memcached_servers']= array("memcache1.internal:11211","memcache2.internal:11211",); // try to add a server-related prefix $GLOBALS['blog_id']=$_SERVER['SERVER_NAME']; ini_set('memcached.sess_prefix','memc.sess.key.'.$_SERVER['SERVER_NAME'].'.');
IMHO the wp don't store the data with a significant prefix/salt so one blog fetch onother blog datas!
The work around
As workaround I've intalled the wp-plugin "Memcached Object Cache", that uses php-pecl-memcache (2.2.7) (note the missing "d") and the following code in config:
define( 'WP_CACHE_KEY_SALT', $_SERVER['SERVER_NAME'] );
I think that I miss some set-up of memcached-redux but I don't exclude a missing functionality (or a bug).
Final goal is to use php-pecl-memcached, so my work around can be the solution.