From: Platonides Date: Thu, 13 Jan 2011 17:35:54 +0000 (+0000) Subject: Allow to disable the preprocessor cache with $wgPreprocessorCacheThreshold = false X-Git-Tag: 1.31.0-rc.0~32575 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=6e7632e6176460867836010e8757a100f27ed974;p=lhc%2Fweb%2Fwiklou.git Allow to disable the preprocessor cache with $wgPreprocessorCacheThreshold = false --- diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index 45c10626e0..180496d136 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -97,7 +97,7 @@ class Preprocessor_DOM implements Preprocessor { global $wgMemc, $wgPreprocessorCacheThreshold; $xml = false; - $cacheable = strlen( $text ) > $wgPreprocessorCacheThreshold; + $cacheable = $wgPreprocessorCacheThreshold !== false && strlen( $text ) > $wgPreprocessorCacheThreshold; if ( $cacheable ) { wfProfileIn( __METHOD__.'-cacheable' ); diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index f81fd040c9..cca03e77fc 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -85,7 +85,7 @@ class Preprocessor_Hash implements Preprocessor { // Check cache. global $wgMemc, $wgPreprocessorCacheThreshold; - $cacheable = strlen( $text ) > $wgPreprocessorCacheThreshold; + $cacheable = $wgPreprocessorCacheThreshold !== false && strlen( $text ) > $wgPreprocessorCacheThreshold; if ( $cacheable ) { wfProfileIn( __METHOD__.'-cacheable' );