From 1e5961dbf6ae2a00cab14465adb2455b8fe06237 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 22 May 2017 21:32:52 -0700 Subject: [PATCH] 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 --- RELEASE-NOTES-1.30 | 2 ++ includes/GlobalFunctions.php | 4 ++++ 2 files changed, 6 insertions(+) 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 -- 2.20.1