Change-Id: I717948d6550ed2d98c3a89b3e48e161c3af15d48
* @return Status[]|bool
*/
public static function getSessionStatus( User $user, $statusKey ) {
* @return Status[]|bool
*/
public static function getSessionStatus( User $user, $statusKey ) {
- $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
+ $cache = MediaWikiServices::getInstance()->getMainObjectStash();
+ $key = $cache->makeKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
- return MediaWikiServices::getInstance()->getMainObjectStash()->get( $key );
+ return $cache->get( $key );
* @return void
*/
public static function setSessionStatus( User $user, $statusKey, $value ) {
* @return void
*/
public static function setSessionStatus( User $user, $statusKey, $value ) {
- $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
-
$cache = MediaWikiServices::getInstance()->getMainObjectStash();
$cache = MediaWikiServices::getInstance()->getMainObjectStash();
+ $key = $cache->makeKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
+
if ( $value === false ) {
$cache->delete( $key );
} else {
if ( $value === false ) {
$cache->delete( $key );
} else {