jenkins-bot has submitted this change and it was merged. (
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(-)
Approvals:
Robert Vogel: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I1f1adb81153aabba5e3d2563d9d0b2eb80509673
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Pwirth <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits