Only later I catch the $wp_ffpc_backend_status.
I change the code to set the return value, in a optimistic way, it’s true if any server works.
I snippet the whole case code:
/* in case of Memcached */
case 'memcached':
/* Memcached class does not exist, Memcached extension is not available */
if (!class_exists('Memcached'))
return false;
$wp_ffpc_backend_status = false;
$_list = explode(',',$wp_ffpc_config['host']);
if ( $wp_ffpc_backend == NULL )
{
$wp_ffpc_backend = new Memcached();
$wp_ffpc_backend->setOption( Memcached::OPT_COMPRESSION , false );
$wp_ffpc_backend->setOption( Memcached::OPT_BINARY_PROTOCOL , true );
foreach($_list as $_server){
$wp_ffpc_backend->addServer( $_server , $wp_ffpc_config['port'] );
}
}
foreach($_list as $_server){
$wp_ffpc_backend_status = $wp_ffpc_backend_status || array_key_exists( $_server . ':' . $wp_ffpc_config['port'] , $wp_ffpc_backend->getStats() );
}
break;