r80180 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80179‎ | r80180 | r80181 >
Date:17:35, 13 January 2011
Author:platonides
Status:ok
Tags:
Comment:
Allow to disable the preprocessor cache with $wgPreprocessorCacheThreshold = false
Modified paths:
  • /trunk/phase3/includes/parser/Preprocessor_DOM.php (modified) (history)
  • /trunk/phase3/includes/parser/Preprocessor_Hash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Preprocessor_Hash.php
@@ -85,7 +85,7 @@
8686 // Check cache.
8787 global $wgMemc, $wgPreprocessorCacheThreshold;
8888
89 - $cacheable = strlen( $text ) > $wgPreprocessorCacheThreshold;
 89+ $cacheable = $wgPreprocessorCacheThreshold !== false && strlen( $text ) > $wgPreprocessorCacheThreshold;
9090 if ( $cacheable ) {
9191 wfProfileIn( __METHOD__.'-cacheable' );
9292
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php
@@ -97,7 +97,7 @@
9898 global $wgMemc, $wgPreprocessorCacheThreshold;
9999
100100 $xml = false;
101 - $cacheable = strlen( $text ) > $wgPreprocessorCacheThreshold;
 101+ $cacheable = $wgPreprocessorCacheThreshold !== false && strlen( $text ) > $wgPreprocessorCacheThreshold;
102102 if ( $cacheable ) {
103103 wfProfileIn( __METHOD__.'-cacheable' );
104104

Follow-up revisions

RevisionCommit summaryAuthorDate
r89488code documentation for $wgPreprocessorCacheThreshold...hashar09:25, 5 June 2011

Status & tagging log