From 6e7632e6176460867836010e8757a100f27ed974 Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 13 Jan 2011 17:35:54 +0000 Subject: [PATCH] Allow to disable the preprocessor cache with $wgPreprocessorCacheThreshold = false --- includes/parser/Preprocessor_DOM.php | 2 +- includes/parser/Preprocessor_Hash.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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' ); -- 2.20.1