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

Change subject: BSFoundation: Added cache invalidation for new config mechanism
......................................................................

BSFoundation: Added cache invalidation for new config mechanism

Change-Id: I1f1adb81153aabba5e3d2563d9d0b2eb80509673
---
M src/Config.php
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/75/390275/1

diff --git a/src/Config.php b/src/Config.php
index c94e899..eb9a2c1 100644
--- a/src/Config.php
+++ b/src/Config.php
@@ -39,15 +39,18 @@
         */
        protected $loadBalancer = null;
 
+       protected $databaseConfig = null;
+
        /**
         *
         * @param \LoadBalancer $loadBalancer
         */
        public function __construct( $loadBalancer ) {
                $this->loadBalancer = $loadBalancer;
+               $this->databaseConfig = $this->makeDatabaseConfig();
                parent::__construct( [
                        new \GlobalVarConfig( 'bsgOverride' ),
-                       $this->makeDatabaseConfig(),
+                       &$this->databaseConfig,
                        new \GlobalVarConfig( 'bsg' ),
                        new \GlobalVarConfig( 'wg' ),
                ] );
@@ -63,12 +66,11 @@
        }
 
        /**
-        * //TODO: We need a config chache invalidation when writing to the db!
         * Invalidates the cache of config stored in the database
         * @return boolean
         */
        public function invalidateCache() {
-               //TODO: We need a config chache invalidation when writing to 
the db!
+               $this->databaseConfig = $this->makeDatabaseConfig();
                return true;
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f1adb81153aabba5e3d2563d9d0b2eb80509673
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Pwirth <wi...@hallowelt.biz>

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

Reply via email to