42 $this->warmCacheRatio = isset(
$options[
'warmCacheRatio'] )
49 return parent::getWeightScale( $index, $conn );
53 if ( $this->warmCacheRatio > 0 ) {
54 $res = $conn->query(
'SHOW STATUS', __METHOD__ );
55 $s =
$res ? $conn->fetchObject(
$res ) :
false;
57 $host = $this->parent->getServerName( $index );
58 $this->replLogger->error( __METHOD__ .
": could not get status for $host" );
61 if (
$s->Innodb_buffer_pool_pages_total > 0 ) {
62 $ratio =
$s->Innodb_buffer_pool_pages_data /
$s->Innodb_buffer_pool_pages_total;
67 $weight *= min( $ratio / $this->warmCacheRatio, 1.0 );
interface is intended to be more or less compatible with the PHP memcached client.
Multi-datacenter aware caching interface.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options