Merge "Deprecate wfGetCache() and wfGetMainCache()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 17 Aug 2018 18:41:58 +0000 (18:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 17 Aug 2018 18:41:58 +0000 (18:41 +0000)
RELEASE-NOTES-1.32
includes/GlobalFunctions.php
includes/Setup.php

index b6c412c..5522332 100644 (file)
@@ -351,6 +351,9 @@ because of Phabricator reports.
 * $wgContLang is deprecated, use MediaWikiServices::getContentLanguage()
   instead.
 * $wgParser is deprecated, use MediaWikiServices::getParser() instead.
+* wfGetMainCache() is deprecated, use ObjectCache::getLocalClusterInstance()
+  instead.
+* wfGetCache() is deprecated, use ObjectCache::getInstance() instead.
 
 === Other changes in 1.32 ===
 * (T198811) The following tables have had their UNIQUE indexes turned into
index 567db85..d24b74d 100644 (file)
@@ -3119,6 +3119,7 @@ function wfBCP47( $code ) {
 /**
  * Get a specific cache object.
  *
+ * @deprecated since 1.32, use ObjectCache::getInstance() instead
  * @param int|string $cacheType A CACHE_* constants, or other key in $wgObjectCaches
  * @return BagOStuff
  */
@@ -3129,11 +3130,11 @@ function wfGetCache( $cacheType ) {
 /**
  * Get the main cache object
  *
+ * @deprecated since 1.32, use ObjectCache::getLocalClusterInstance() instead
  * @return BagOStuff
  */
 function wfGetMainCache() {
-       global $wgMainCacheType;
-       return ObjectCache::getInstance( $wgMainCacheType );
+       return ObjectCache::getLocalClusterInstance();
 }
 
 /**
index f8650fd..c015eac 100644 (file)
@@ -774,7 +774,7 @@ if ( $wgCommandLineMode ) {
        wfDebug( $debug );
 }
 
-$wgMemc = wfGetMainCache();
+$wgMemc = ObjectCache::getLocalClusterInstance();
 $messageMemc = wfGetMessageCacheStorage();
 
 wfDebugLog( 'caches',