Revert r97468 and implemented it in another way suggested by Tim
This commit is contained in:
parent
9f9242ce6f
commit
2b79fc74e5
2 changed files with 7 additions and 8 deletions
|
|
@ -4156,11 +4156,10 @@ $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.
|
||||
* Overwrite the caching key prefix with custom value.
|
||||
* @since 1.19
|
||||
*/
|
||||
$wgWikiID = false;
|
||||
$wgCachePrefix = false;
|
||||
|
||||
/**
|
||||
* Display the new debugging toolbar. This also enables profiling on database
|
||||
|
|
|
|||
|
|
@ -3210,8 +3210,10 @@ function wfGetPrecompiledData( $name ) {
|
|||
* @return String
|
||||
*/
|
||||
function wfMemcKey( /*... */ ) {
|
||||
global $wgCachePrefix;
|
||||
$prefix = $wgCachePrefix === false ? wfWikiID() : $wgCachePrefix;
|
||||
$args = func_get_args();
|
||||
$key = wfWikiID() . ':' . implode( ':', $args );
|
||||
$key = $prefix . ':' . implode( ':', $args );
|
||||
$key = str_replace( ' ', '_', $key );
|
||||
return $key;
|
||||
}
|
||||
|
|
@ -3241,10 +3243,8 @@ function wfForeignMemcKey( $db, $prefix /*, ... */ ) {
|
|||
* @return String
|
||||
*/
|
||||
function wfWikiID() {
|
||||
global $wgDBprefix, $wgDBname, $wgWikiID;
|
||||
if ( $wgWikiID !== false ) {
|
||||
return $wgWikiID;
|
||||
} elseif ( $wgDBprefix ) {
|
||||
global $wgDBprefix, $wgDBname;
|
||||
if ( $wgDBprefix ) {
|
||||
return "$wgDBname-$wgDBprefix";
|
||||
} else {
|
||||
return $wgDBname;
|
||||
|
|
|
|||
Loading…
Reference in a new issue