}
// Determine the options which affect this article
- $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article ) );
+ $casToken = null;
+ $optionsKey = $this->mMemc->get(
+ $this->getOptionsKey( $article ), $casToken, BagOStuff::READ_VERIFIED );
if ( $optionsKey instanceof CacheTime ) {
if ( !$useOutdated && $optionsKey->expired( $article->getTouched() ) ) {
wfIncrStats( "pcache.miss.expired" );
return false;
}
- $value = $this->mMemc->get( $parserOutputKey );
+ $casToken = null;
+ $value = $this->mMemc->get( $parserOutputKey, $casToken, BagOStuff::READ_VERIFIED );
if ( !$value ) {
wfDebug( "ParserOutput cache miss.\n" );
wfIncrStats( "pcache.miss.absent" );
wfIncrStats( "pcache.miss.revid" );
$revId = $article->getLatest();
$cachedRevId = $value->getCacheRevisionId();
- wfDebug( "ParserOutput key is for an old revision, latest $revId, cached $cachedRevId\n" );
+ wfDebug(
+ "ParserOutput key is for an old revision, latest $revId, cached $cachedRevId\n"
+ );
$value = false;
- } elseif ( Hooks::run( 'RejectParserCacheValue', array( $value, $wikiPage, $popts ) ) === false ) {
+ } elseif (
+ Hooks::run( 'RejectParserCacheValue', array( $value, $wikiPage, $popts ) ) === false
+ ) {
wfIncrStats( 'pcache.miss.rejected' );
- wfDebug( "ParserOutput key valid, but rejected by RejectParserCacheValue hook handler.\n" );
+ wfDebug(
+ "ParserOutput key valid, but rejected by RejectParserCacheValue hook handler.\n"
+ );
$value = false;
} else {
wfIncrStats( "pcache.hit" );
// ...and its pointer
$this->mMemc->set( $this->getOptionsKey( $page ), $optionsKey, $expire );
- Hooks::run( 'ParserCacheSaveComplete', array( $this, $parserOutput, $page->getTitle(), $popts, $revId ) );
+ Hooks::run(
+ 'ParserCacheSaveComplete',
+ array( $this, $parserOutput, $page->getTitle(), $popts, $revId )
+ );
} else {
wfDebug( "Parser output was marked as uncacheable and has not been saved.\n" );
}