42 $this->warmCacheRatio =
$options[
'warmCacheRatio'] ?? 0.0;
47 return parent::getWeightScale( $index, $conn );
51 if ( $this->warmCacheRatio > 0 ) {
52 $res = $conn->query(
'SHOW STATUS', __METHOD__ );
53 $s =
$res ? $conn->fetchObject(
$res ) :
false;
55 $host = $this->parent->getServerName( $index );
56 $this->replLogger->error( __METHOD__ .
": could not get status for $host" );
59 if (
$s->Innodb_buffer_pool_pages_total > 0 ) {
60 $ratio =
$s->Innodb_buffer_pool_pages_data /
$s->Innodb_buffer_pool_pages_total;
65 $weight *= min( $ratio / $this->warmCacheRatio, 1.0 );
Class representing a cache/ephemeral data store.
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
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))