230c230
<         $memcache = new Memcached;
---
>         $memcache = new Memcached("mcd-$cluster");
242,251c242,255
<       // Link all the servers to this cluster.
<       foreach ($memcache_servers as $s => $c) {
<         if ($c == $cluster) {
<           list($host, $port) = explode(':', $s);
< 
<           // This is a server that belongs to this cluster.
<           if (!class_exists('Memcached') && !$init) {
<             // If using PECL memcache extension, use ->connect for first server
<             if ($memcache->connect($host, $port)) {
<               $init = TRUE;
---
>       // See if this cluster server list is empty
>       if (!class_exists('Memcached') || !count($memcache->getServerList())) {
> 
>         // Link all the servers to this cluster.
>         foreach ($memcache_servers as $s => $c) {
>           if ($c == $cluster) {
>             list($host, $port) = explode(':', $s);
> 
>             // This is a server that belongs to this cluster.
>             if (!class_exists('Memcached') && !$init) {
>               // If using PECL memcache extension, use ->connect for first server
>               if ($memcache->connect($host, $port)) {
>                 $init = TRUE;
>               }
253,256c257,260
<           }
<           else {
<             if ($memcache->addServer($host, $port) && !$init) {
<               $init = TRUE;
---
>             else {
>               if ($memcache->addServer($host, $port) && !$init) {
>                 $init = TRUE;
>               }
259a264,267
> 
>       }
>       else {
>         $init = TRUE;
