Merge "Refactor Statsd classes to enable null collector to work."
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 8f2c24e..9150338 100644 (file)
@@ -2959,10 +2959,9 @@ function wfGetPrecompiledData( $name ) {
 }
 
 /**
- * @deprecated since 1.30 Call makeKey on a ObjectCache instance
- *
  * Make a cache key for the local wiki.
  *
+ * @deprecated since 1.30 Call makeKey on a BagOStuff instance
  * @param string $args,...
  * @return string
  */
@@ -2993,14 +2992,13 @@ 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
  * instead. Must have a prefix as otherwise keys that use a database name
  * in the first segment will clash with wfMemcKey/wfForeignMemcKey.
  *
+ * @deprecated since 1.30 Call makeGlobalKey on a BagOStuff instance
  * @since 1.26
  * @param string $args,...
  * @return string
@@ -3516,7 +3514,9 @@ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
        }
 
        $cache = ObjectCache::getLocalServerInstance( 'hash' );
-       $key = wfMemcKey( 'bad-image-list', ( $blacklist === null ) ? 'default' : md5( $blacklist ) );
+       $key = $cache->makeKey(
+               'bad-image-list', ( $blacklist === null ) ? 'default' : md5( $blacklist )
+       );
        $badImages = $cache->get( $key );
 
        if ( $badImages === false ) { // cache miss