Basically I'm overriding wfWikiID to run multiple instances on same database
but with different settings, and I don't want to them mess each others caches.
*/
$wgParserTestRemote = false;
+
+/**
+ * Overwrite the caching key prefix with custom value. Do not set if using
+ * load balancer, since it depends on the key being in certain format.
+ * @since 1.19
+ */
+$wgWikiID = false;
+
/** @} */ # end of profiling, testing and debugging }
/************************************************************************//**
* @return String
*/
function wfWikiID() {
- global $wgDBprefix, $wgDBname;
- if ( $wgDBprefix ) {
+ global $wgDBprefix, $wgDBname, $wgWikiID;
+ if ( $wgWikiID !== false ) {
+ return $wgWikiID;
+ } elseif ( $wgDBprefix ) {
return "$wgDBname-$wgDBprefix";
} else {
return $wgDBname;