Deprecate wfMemcKey() and wfGlobalCacheKey()
authorKunal Mehta <legoktm@member.fsf.org>
Tue, 23 May 2017 04:32:52 +0000 (21:32 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 23 May 2017 04:32:52 +0000 (21:32 -0700)
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
includes/GlobalFunctions.php

index 4e25532..42ae368 100644 (file)
@@ -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
index d21cc1d..10a67c3 100644 (file)
@@ -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