Remove $wgMemc

Deprecated since 1.35, and no longer used in core, bundled, or
wmf-deployed projects.

Bug: T160813
Change-Id: Idd3166ef90d1795a0b22dc29d52de76048d0703e
This commit is contained in:
Timo Tijhof 2020-03-29 22:58:48 +01:00 committed by Krinkle
parent 16f2a01b6a
commit 10bdad0d35
6 changed files with 8 additions and 14 deletions

View file

@ -9,7 +9,6 @@
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgContLang" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgMemc" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgUser" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgVersion" />

View file

@ -87,6 +87,9 @@ because of Phabricator reports.
- All methods of the old SpecialPageFactory; the entire class was removed
* The global function `wfWaitForSlaves`, deprecated since 1.27 & hard-deprecated
since 1.35, has been removed. Use LBFactory::waitForReplication() instead.
* The global variable $wgMemc, deprecated since 1.35, has been removed.
Usage should generally be migrated to WANObjectCache, or if you really need
the internal object, use ObjectCache::getLocalClusterInstance instead.
* The support for IE8 has been dropped.
* Less mixin `.background-image-svg-quick()` from mediawiki.mixins.less,
deprecated since 1.35, has been removed.

View file

@ -61,6 +61,3 @@ $wgParser
$wgRequest
WebRequest object, to get request data
$wgMemc
Object caches

View file

@ -2355,10 +2355,12 @@ $wgExternalServers = [];
$wgDefaultExternalStore = false;
/**
* Revision text may be cached in $wgMemc to reduce load on external storage
* servers and object extraction overhead for frequently-loaded revisions.
* Revision text may be cached in the main WAN cache to reduce load on external
* storage servers and object extraction overhead for frequently-loaded revisions.
*
* Set to 0 to disable, or number of seconds before cache expiry.
*
* @var int
*/
$wgRevisionCacheExpiry = 86400 * 7;

View file

@ -685,12 +685,6 @@ if ( $wgRequest->getCookie( 'UseDC', '' ) === 'master' ) {
}
} )();
/**
* @var BagOStuff $wgMemc
* @deprecated since 1.35, use the LocalServerObjectCache service instead
*/
$wgMemc = ObjectCache::getLocalClusterInstance();
// Most of the config is out, some might want to run hooks here.
Hooks::runner()->onSetupAfterCache();

View file

@ -405,7 +405,7 @@ abstract class Installer {
* Constructor, always call this from child classes.
*/
public function __construct() {
global $wgMemc, $wgUser, $wgObjectCaches;
global $wgUser, $wgObjectCaches;
$defaultConfig = new GlobalVarConfig(); // all the stuff from DefaultSettings.php
$installerConfig = self::getInstallerConfig( $defaultConfig );
@ -431,7 +431,6 @@ abstract class Installer {
// Disable object cache (otherwise CACHE_ANYTHING will try CACHE_DB and
// SqlBagOStuff will then throw since we just disabled wfGetDB)
$wgObjectCaches = $mwServices->getMainConfig()->get( 'ObjectCaches' );
$wgMemc = ObjectCache::getInstance( CACHE_NONE );
// Disable interwiki lookup, to avoid database access during parses
$mwServices->redefineService( 'InterwikiLookup', function () {