Fix some broke cache key generations
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 20 Nov 2017 05:30:45 +0000 (21:30 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 20 Nov 2017 05:30:45 +0000 (21:30 -0800)
Change-Id: Ib724fe0cfa866351caee89d3451b6c4b7b6a4578

includes/changes/ChangesList.php
includes/media/TransformationalImageHandler.php

index bc50096..5b8559e 100644 (file)
@@ -576,7 +576,9 @@ class ChangesList extends ContextSource {
                        return '';
                }
                $cache = $this->watchMsgCache;
-               return $cache->getWithSetCallback( $count, $cache::TTL_INDEFINITE,
+               return $cache->getWithSetCallback(
+                       $cache->makeKey( 'watching-users-msg', $count ),
+                       $cache::TTL_INDEFINITE,
                        function () use ( $count ) {
                                return $this->msg( 'number_of_watching_users_RCview' )
                                        ->numParams( $count )->escaped();
index de438da..85430d2 100644 (file)
@@ -512,7 +512,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
                $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
                $method = __METHOD__;
                return $cache->getWithSetCallback(
-                       'imagemagick-version',
+                       $cache->makeGlobalKey( 'imagemagick-version' ),
                        $cache::TTL_HOUR,
                        function () use ( $method ) {
                                global $wgImageMagickConvertCommand;