From: saper Date: Fri, 23 Oct 2015 22:44:32 +0000 (+0200) Subject: installer: Choose CACHE_ACCEL as the default if available X-Git-Tag: 1.31.0-rc.0~8415^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=b3dc2fedc5e35015f9c75621aa3ddef9c830bde3;p=lhc%2Fweb%2Fwiklou.git installer: Choose CACHE_ACCEL as the default if available Bug: T49162 Change-Id: I57c8887c00cb3b73367e6733af1bf93dbab0c639 --- diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index f674d598d3..2b95255e8d 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -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 ==== diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 0fcda7d087..2ad2e11baf 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -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(