From: Platonides Date: Tue, 10 Aug 2010 12:10:49 +0000 (+0000) Subject: Follow up r70783 CR. X-Git-Tag: 1.31.0-rc.0~35567 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=dca6afc17236b5e85142d4d2b7625bc5fc26acd9;p=lhc%2Fweb%2Fwiklou.git Follow up r70783 CR. Document getETag() --- diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index 95fe6a1faf..ce820fe54d 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -48,6 +48,12 @@ class ParserCache { return wfMemcKey( 'pcache', 'idoptions', "{$pageid}" ); } + /** + * Provides an E-Tag suitable for the whole page, even if $article is + * just the main wikitext. So it uses the complete set of user options. + * Most importantly, that includes the user language, but other options + * would give problems on some setups, too. + */ function getETag( $article, $popts ) { return 'W/"' . $this->getParserOutputKey( $article, $popts->optionsHash( ParserOptions::legacyOptions() ) ) . @@ -74,7 +80,7 @@ class ParserCache { // Determine the options which affect this article $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article ) ); - if ( $optionsKey !== false ) { + if ( $optionsKey != false ) { if ( !$useOutdated && $optionsKey->expired( $article->mTouched ) ) { wfIncrStats( "pcache_miss_expired" ); $cacheTime = $optionsKey->getCacheTime();