* Avoid casting page ID as int twice
# Try file cache
if( $oldid === 0 && $this->checkTouched() ) {
- $wgOut->setETag( $parserCache->getETag($this,$wgUser) );
+ global $wgUseETag;
+ if( $wgUseETag ) {
+ $wgOut->setETag( $parserCache->getETag($this,$wgUser) );
+ }
if( $wgOut->checkLastModified( $this->getTouched() ) ){
wfProfileOut( __METHOD__ );
return;
} else {
$edit = '';
}
- $pageid = intval( $article->getID() );
+ $pageid = $article->getID();
$renderkey = (int)($action == 'render');
- $key = wfMemcKey( 'pcache', 'idhash', "$pageid-$renderkey!$hash$edit" );
+ $key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}{$edit}" );
return $key;
}