From: daniel Date: Fri, 5 Oct 2012 17:05:21 +0000 (+0200) Subject: For now, use the parser cache only for wikitext. X-Git-Tag: 1.31.0-rc.0~22097^2^2~7 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=ab91faf8773167fe271649a39aa97cca57da017d;p=lhc%2Fweb%2Fwiklou.git 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 --- 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?