Switched upload chunk status store to the main object stash
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 30 Jun 2015 18:04:33 +0000 (11:04 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 30 Jun 2015 18:04:33 +0000 (11:04 -0700)
Bug: T88493
Change-Id: I91993943ebc39846b78956e71c83358868198c2a

includes/upload/UploadBase.php

index 426c752..493df2e 100644 (file)
@@ -1935,7 +1935,7 @@ abstract class UploadBase {
        public static function getSessionStatus( User $user, $statusKey ) {
                $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
 
-               return wfGetCache( CACHE_ANYTHING )->get( $key );
+               return ObjectCache::getMainStashInstance()->get( $key );
        }
 
        /**
@@ -1951,7 +1951,7 @@ abstract class UploadBase {
        public static function setSessionStatus( User $user, $statusKey, $value ) {
                $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
 
-               $cache = wfGetCache( CACHE_ANYTHING );
+               $cache = ObjectCache::getMainStashInstance();
                if ( $value === false ) {
                        $cache->delete( $key );
                } else {