For now, use the parser cache only for wikitext.
authordaniel <daniel.kinzler@wikimedia.de>
Fri, 5 Oct 2012 17:05:21 +0000 (19:05 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Fri, 5 Oct 2012 17:05:21 +0000 (19:05 +0200)
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

index 91da3e8..28f9705 100644 (file)
@@ -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?