Turn ParserCache into a service, deprecate $parserMemc
authorKunal Mehta <legoktm@member.fsf.org>
Tue, 30 May 2017 00:10:16 +0000 (17:10 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Thu, 6 Jul 2017 02:56:49 +0000 (19:56 -0700)
commit399adec9adaecc140f36b0efcd0a23af7dbdf6be
tree84d7eb31a3b4ffac102cc46b71140b3e277f9038
parent1d77070f19e37efd80bf9038d5259e19719c6d53
Turn ParserCache into a service, deprecate $parserMemc

ParserCache is already a singleton, making it a good candidate for a
service. $parserMemc is an odd global (it lacks the "wg" prefix) and is
ripe for deprecation.

The following are now deprecated:
* $parserMemc global
* ParserCache::singleton()
* wfGetParserCacheStorage()

A ParserCache::getCacheStorage() method was added for cases where direct
access to the underlying BagOStuff object is necessary.

Usage of $parserMemc will emit deprecation warnings through the
DeprecatedGlobal class mechanism. All usage in core was migrated.

Also take this opportunity to inject the $wgCacheEpoch global value into
ParserCache. This will require an update to the FlaggedRevs extension.

Change-Id: I2ac7afff0d8522214329248c3d1cdccd0f72bbd4
RELEASE-NOTES-1.30
includes/GlobalFunctions.php
includes/MediaWikiServices.php
includes/ServiceWiring.php
includes/Setup.php
includes/parser/ParserCache.php
maintenance/purgeParserCache.php
tests/phpunit/includes/MediaWikiServicesTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php