From 551940b3829d33bf361414f59dc9c01d43c04329 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 21 Sep 2015 11:41:44 -0700 Subject: [PATCH] Cleaned up $asyncWrites member variable in MultiWriteBagOStuff Change-Id: I27e48aef77ac0f6453b7837f2b2686b7b5b726d4 --- includes/objectcache/MultiWriteBagOStuff.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/includes/objectcache/MultiWriteBagOStuff.php b/includes/objectcache/MultiWriteBagOStuff.php index b3906596be..16e842ff5d 100644 --- a/includes/objectcache/MultiWriteBagOStuff.php +++ b/includes/objectcache/MultiWriteBagOStuff.php @@ -32,9 +32,7 @@ class MultiWriteBagOStuff extends BagOStuff { /** @var BagOStuff[] */ protected $caches; /** @var bool Use async secondary writes */ - protected $asyncReplication = false; - /** @var array[] */ - protected $asyncWrites = array(); + protected $asyncWrites = false; /** * $params include: @@ -72,9 +70,7 @@ class MultiWriteBagOStuff extends BagOStuff { : ObjectCache::newFromParams( $cacheInfo ); } - if ( isset( $params['replication'] ) && $params['replication'] === 'async' ) { - $this->asyncReplication = true; - } + $this->asyncWrites = isset( $params['replication'] ) && $params['replication'] === 'async'; } /** @@ -199,7 +195,7 @@ class MultiWriteBagOStuff extends BagOStuff { array_shift( $args ); foreach ( $this->caches as $i => $cache ) { - if ( $i == 0 || !$this->asyncReplication ) { + if ( $i == 0 || !$this->asyncWrites ) { // First store or in sync mode: write now and get result if ( !call_user_func_array( array( $cache, $method ), $args ) ) { $ret = false; -- 2.20.1