Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339330 )

Change subject: Use HashBag instead of EmptyBag
......................................................................

Use HashBag instead of EmptyBag

If the local cluster cache is an EmptyBagOfStuff, fall back to a
HashBagOStuff to at least cache for the duration of the request.

Change-Id: I570cdcc7347312bb246848b5d43d22ce1720d3f1
---
M gateway_common/LocalClusterPsr6Cache.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/30/339330/1

diff --git a/gateway_common/LocalClusterPsr6Cache.php 
b/gateway_common/LocalClusterPsr6Cache.php
index 30740d8..c307100 100644
--- a/gateway_common/LocalClusterPsr6Cache.php
+++ b/gateway_common/LocalClusterPsr6Cache.php
@@ -13,6 +13,9 @@
 class LocalClusterPsr6Cache extends BagOStuffPsrCache {
        public function __construct() {
                $mainCache = ObjectCache::getLocalClusterInstance();
+               if ( $mainCache instanceof EmptyBagOStuff ) {
+                       $mainCache = new HashBagOStuff();
+               }
                parent::__construct( $mainCache );
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/339330
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I570cdcc7347312bb246848b5d43d22ce1720d3f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to