From: Kunal Mehta Date: Tue, 23 May 2017 04:32:52 +0000 (-0700) Subject: Deprecate wfMemcKey() and wfGlobalCacheKey() X-Git-Tag: 1.31.0-rc.0~3185^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=1e5961dbf6ae2a00cab14465adb2455b8fe06237;p=lhc%2Fweb%2Fwiklou.git Deprecate wfMemcKey() and wfGlobalCacheKey() For a while now these functions have called makeKey/makeGlobalKey() on the default ObjectCache instances, and callers should now use those functions directly instead. There are other advantages to doing so, like in cases where the ObjectCache instance being used has a different makeKey implementation (e.g. memcache) than the default configured cache. Change-Id: I9abf6badbf3ba800e591d2503b714433d5faf1e3 --- diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30 index 4e25532dc0..42ae368acc 100644 --- a/RELEASE-NOTES-1.30 +++ b/RELEASE-NOTES-1.30 @@ -76,6 +76,8 @@ changes to languages because of Phabricator reports. * The ExtractThumbParameters hook (deprecated in 1.21) was removed. * The OutputPage::addParserOutputNoText and ::getHeadLinks methods (both deprecated in 1.24) were removed. +* wfMemcKey() and wfGlobalCacheKey() were deprecated. ObjectCache::makeKey() and + ObjectCache::makeGlobalKey() should be used instead. == Compatibility == MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index d21cc1d749..10a67c36ab 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2960,6 +2960,8 @@ function wfGetPrecompiledData( $name ) { } /** + * @deprecated since 1.30 Call makeKey on a ObjectCache instance + * * Make a cache key for the local wiki. * * @param string $args,... @@ -2992,6 +2994,8 @@ function wfForeignMemcKey( $db, $prefix /*...*/ ) { } /** + * @deprecated since 1.30 Call makeGlobalKey on a ObjectCache instance + * * Make a cache key with database-agnostic prefix. * * Doesn't have a wiki-specific namespace. Uses a generic 'global' prefix