From ab91faf8773167fe271649a39aa97cca57da017d Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 5 Oct 2012 19:05:21 +0200 Subject: [PATCH] For now, use the parser cache only for wikitext. Caching could be enabled for other content types, but for the moment, JS and CSS pages rely on the fact that the ShowRawCssJs hooks is called for every view - which is bypassed when the parser cache is used. Change-Id: Icf603b9f2a685d9e705db3459fcd12dae1fdba57 --- includes/content/ContentHandler.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 91da3e8bc0..28f97059c6 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -913,14 +913,14 @@ abstract class ContentHandler { /** * Returns true for content models that support caching using the - * ParserCache mechanism. See WikiPage::isParserCacheUser(). + * ParserCache mechanism. See WikiPage::isParserCacheUsed(). * * @since 1.21 * * @return bool */ public function isParserCacheSupported() { - return true; + return false; } /** @@ -1085,6 +1085,17 @@ class WikitextContentHandler extends TextContentHandler { public function supportsSections() { return true; } + + /** + * Returns true, because wikitext supports caching using the + * ParserCache mechanism. + * + * @since 1.21 + * @return bool + */ + public function isParserCacheSupported() { + return true; + } } # XXX: make ScriptContentHandler base class, do highlighting stuff there? -- 2.20.1