From dca6afc17236b5e85142d4d2b7625bc5fc26acd9 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 10 Aug 2010 12:10:49 +0000 Subject: [PATCH] Follow up r70783 CR. Document getETag() --- includes/parser/ParserCache.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); -- 2.20.1