r55801 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55800‎ | r55801 | r55802 >
Date:03:41, 4 September 2009
Author:tstarling
Status:ok
Tags:
Comment:
Fix disabling of APC cache when loading message files: apc.enabled has been PHP_INI_SYSTEM since 3.0.13 but apc.cache_by_default works. This reduces the required APC cache space by about half on my test wiki, from 20MB to 10MB.
Modified paths:
  • /trunk/phase3/includes/LocalisationCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LocalisationCache.php
@@ -377,9 +377,9 @@
378378 */
379379 protected function readPHPFile( $_fileName, $_fileType ) {
380380 // Disable APC caching
381 - $_apcEnabled = ini_set( 'apc.enabled', '0' );
 381+ $_apcEnabled = ini_set( 'apc.cache_by_default', '0' );
382382 include( $_fileName );
383 - ini_set( 'apc.enabled', $_apcEnabled );
 383+ ini_set( 'apc.cache_by_default', $_apcEnabled );
384384
385385 if ( $_fileType == 'core' || $_fileType == 'extension' ) {
386386 $data = compact( self::$allKeys );

Status & tagging log