global $wgRequest;
// idhash seem to mean 'page id' + 'rendering hash' (r3710)
- $pageid = $article->getID();
+ $pageid = $article->getId();
$renderkey = (int)( $wgRequest->getVal( 'action' ) == 'render' );
$key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" );
* @return mixed|string
*/
protected function getOptionsKey( $article ) {
- $pageid = $article->getID();
+ $pageid = $article->getId();
return wfMemcKey( 'pcache', 'idoptions', "{$pageid}" );
}
}
// 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" );
);
$value = false;
} elseif (
- Hooks::run( 'RejectParserCacheValue', array( $value, $wikiPage, $popts ) ) === false
+ Hooks::run( 'RejectParserCacheValue', [ $value, $wikiPage, $popts ] ) === false
) {
wfIncrStats( 'pcache.miss.rejected' );
wfDebug(
Hooks::run(
'ParserCacheSaveComplete',
- array( $this, $parserOutput, $page->getTitle(), $popts, $revId )
+ [ $this, $parserOutput, $page->getTitle(), $popts, $revId ]
);
} else {
wfDebug( "Parser output was marked as uncacheable and has not been saved.\n" );