From 7abf99282d66052f06a7aef107e74cf5de7fcc76 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 24 Sep 2015 18:09:41 -0700 Subject: [PATCH] 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 --- includes/registration/ExtensionRegistry.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ); -- 2.20.1