From: Kunal Mehta Date: Fri, 25 Sep 2015 01:09:41 +0000 (-0700) Subject: registration: Vary the loaded queue cache on $wgVersion X-Git-Tag: 1.31.0-rc.0~9834^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=7abf99282d66052f06a7aef107e74cf5de7fcc76;p=lhc%2Fweb%2Fwiklou.git registration: Vary the loaded queue cache on $wgVersion If the version changes, we need to recheck the dependency requirements. Follows-up cef1f31167177ca05c8981d. Change-Id: I30e95b5dec7b5a1d9ca391fb2ae55e0b3de0c528 --- diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 23e29d8889..f91aeffaf9 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -114,12 +114,22 @@ class ExtensionRegistry { } public function loadFromQueue() { + global $wgVersion; if ( !$this->queued ) { return; } + // A few more things to vary the cache on + $versions = array( + 'registration' => self::CACHE_VERSION, + 'mediawiki' => $wgVersion + ); + // See if this queue is in APC - $key = wfMemcKey( 'registration', md5( json_encode( $this->queued ) ), self::CACHE_VERSION ); + $key = wfMemcKey( + 'registration', + md5( json_encode( $this->queued + $versions ) ) + ); $data = $this->cache->get( $key ); if ( $data ) { $this->exportExtractedData( $data );