From 7d82ce8bfdda964197a46e5da863c2c59eac8a0c Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sat, 21 Sep 2019 02:31:04 +0100 Subject: [PATCH] localisation: Remove PHP5-specific perf optimisation The `apc.cache_by_default` setting is a PHP5-era setting relating to the part of php5-apc now known as opcache (as opposed to the part now known as apcu). This setting doesn't exist in PHP 7, and trying to set it doesn't do anything useful. Bug: T206986 Change-Id: I46a91897b2b33b5ce6505beb74d404982cb0641c --- includes/cache/localisation/LocalisationCache.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index 26468452b4..c6d6b8fa5b 100644 --- a/includes/cache/localisation/LocalisationCache.php +++ b/includes/cache/localisation/LocalisationCache.php @@ -519,17 +519,8 @@ class LocalisationCache { * @return array */ protected function readPHPFile( $_fileName, $_fileType ) { - // Disable APC caching - Wikimedia\suppressWarnings(); - $_apcEnabled = ini_set( 'apc.cache_by_default', '0' ); - Wikimedia\restoreWarnings(); - include $_fileName; - Wikimedia\suppressWarnings(); - ini_set( 'apc.cache_by_default', $_apcEnabled ); - Wikimedia\restoreWarnings(); - $data = []; if ( $_fileType == 'core' || $_fileType == 'extension' ) { foreach ( self::$allKeys as $key ) { -- 2.20.1