/**
* Returns true for content models that support caching using the
- * ParserCache mechanism. See WikiPage::isParserCacheUsed().
+ * ParserCache mechanism. See WikiPage::shouldCheckParserCache().
*
* @since 1.21
*
// wasted CPU by other apaches or job runners. We don't want to always save to
// cache as this can cause high cache I/O and LRU churn when a template changes.
if ( $elapsed >= self::PARSE_THRESHOLD_SEC
- && $page->isParserCacheUsed( $parserOptions, $revision->getId() )
+ && $page->shouldCheckParserCache( $parserOptions, $revision->getId() )
&& $parserOutput->isCacheable()
) {
$ctime = wfTimestamp( TS_MW, (int)$start ); // cache time
}
# Should the parser cache be used?
- $useParserCache = $this->mPage->isParserCacheUsed( $parserOptions, $oldid );
+ $useParserCache = $this->mPage->shouldCheckParserCache( $parserOptions, $oldid );
wfDebug( 'Article::view using parser cache: ' . ( $useParserCache ? 'yes' : 'no' ) . "\n" );
if ( $user->getStubThreshold() ) {
$this->getContext()->getStats()->increment( 'pcache_miss_stub' );
* @param int $oldId
* @return bool
*/
- public function isParserCacheUsed( ParserOptions $parserOptions, $oldId ) {
+ public function shouldCheckParserCache( ParserOptions $parserOptions, $oldId ) {
return $parserOptions->getStubThreshold() == 0
&& $this->exists()
&& ( $oldId === null || $oldId === 0 || $oldId === $this->getLatest() )
*/
public function getParserOutput( ParserOptions $parserOptions, $oldid = null ) {
- $useParserCache = $this->isParserCacheUsed( $parserOptions, $oldid );
+ $useParserCache = $this->shouldCheckParserCache( $parserOptions, $oldid );
wfDebug( __METHOD__ . ': using parser cache: ' . ( $useParserCache ? 'yes' : 'no' ) . "\n" );
if ( $parserOptions->getStubThreshold() ) {
wfIncrStats( 'pcache.miss.stub' );