Allow to disable the preprocessor cache with $wgPreprocessorCacheThreshold = false
authorPlatonides <platonides@users.mediawiki.org>
Thu, 13 Jan 2011 17:35:54 +0000 (17:35 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 13 Jan 2011 17:35:54 +0000 (17:35 +0000)
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php

index 45c1062..180496d 100644 (file)
@@ -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' );
 
index f81fd04..cca03e7 100644 (file)
@@ -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' );