localisation: Remove PHP5-specific perf optimisation
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 21 Sep 2019 01:31:04 +0000 (02:31 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 21 Sep 2019 01:31:04 +0000 (02:31 +0100)
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

index 2646845..c6d6b8f 100644 (file)
@@ -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 ) {