Merge "installer: Choose CACHE_ACCEL as the default if available"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 7 Jan 2016 01:33:38 +0000 (01:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 7 Jan 2016 01:33:38 +0000 (01:33 +0000)
RELEASE-NOTES-1.27
includes/installer/WebInstallerPage.php

index 4d3507c..9b12b72 100644 (file)
@@ -99,6 +99,8 @@ production.
 * Added a new hook, 'TitleMoveCompleting', which runs before a page move is committed.
 * $wgCdnReboundPurgeDelay was added to provide secondary delayed purges of URLs
   from CDN to mitigate DB replication lag and WAN cache purge lag.
+* (T49162) Installer will default to setting CACHE_ACCEL as the main cache type
+  if it is available.
 
 === External library changes in 1.27 ===
 ==== Upgraded external libraries ====
index 0fcda7d..2ad2e11 100644 (file)
@@ -1134,8 +1134,12 @@ class WebInstallerOptions extends WebInstallerPage {
                );
 
                $caches = array( 'none' );
+               $cachevalDefault = 'none';
+
                if ( count( $this->getVar( '_Caches' ) ) ) {
+                       // A CACHE_ACCEL implementation is available
                        $caches[] = 'accel';
+                       $cachevalDefault = 'accel';
                }
                $caches[] = 'memcached';
 
@@ -1145,7 +1149,7 @@ class WebInstallerOptions extends WebInstallerPage {
                        // We need to set a default here; but don't hardcode it
                        // or we lose it every time we reload the page for validation
                        // or going back!
-                       $cacheval = 'none';
+                       $cacheval = $cachevalDefault;
                }
                $hidden = ( $cacheval == 'memcached' ) ? '' : 'display: none';
                $this->addHTML(