Make cache object mandatory for MessageCache
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 22 Nov 2016 21:02:10 +0000 (13:02 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 22 Nov 2016 21:02:10 +0000 (13:02 -0800)
The only caller is MessageCache::singleton().

Change-Id: Ifcf0d458b9c691d6dce90b56b2f0f7d35e6ddef3

includes/cache/MessageCache.php

index 1bcab41..3f78d9a 100644 (file)
@@ -153,13 +153,9 @@ class MessageCache {
         * @param bool $useDB
         * @param int $expiry Lifetime for cache. @see $mExpiry.
         */
-       function __construct( $memCached, $useDB, $expiry ) {
+       function __construct( BagOStuff $memCached, $useDB, $expiry ) {
                global $wgUseLocalMessageCache;
 
-               if ( !$memCached ) {
-                       $memCached = wfGetCache( CACHE_NONE );
-               }
-
                $this->mMemc = $memCached;
                $this->mDisable = !$useDB;
                $this->mExpiry = $expiry;