From: daniel Date: Tue, 24 Apr 2012 10:06:23 +0000 (+0200) Subject: introducing ContentHandler::isParserCacheSupported() X-Git-Tag: 1.31.0-rc.0~22097^2^2~211 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=25d53af4d2b1fdd0eaa0878c4d5b6c6e8f9f7394;p=lhc%2Fweb%2Fwiklou.git introducing ContentHandler::isParserCacheSupported() --- diff --git a/includes/ContentHandler.php b/includes/ContentHandler.php index 82fb0496ad..d3acfa303f 100644 --- a/includes/ContentHandler.php +++ b/includes/ContentHandler.php @@ -637,6 +637,16 @@ abstract class ContentHandler { return $undone_content; } + + /** + * Returns true for content models that support caching using the ParserCache mechanism. + * See WikiPage::isParserCacheUser(). + * + * @return book + */ + public function isParserCacheSupported() { + return true; + } } diff --git a/includes/WikiPage.php b/includes/WikiPage.php index b34ab390b4..490083d583 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -883,7 +883,7 @@ class WikiPage extends Page { && $parserOptions->getStubThreshold() == 0 && $this->mTitle->exists() && ( $oldid === null || $oldid === 0 || $oldid === $this->getLatest() ) - && $this->mTitle->isWikitextPage(); #FIXME: ask ContentHandler if cachable! + && $this->getContentHandler()->isParserCacheSupported(); } /**