Index: trunk/phase3/includes/parser/ParserCache.php |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | */ |
13 | 13 | class ParserCache { |
14 | 14 | private $mMemc; |
| 15 | + const try116cache = false; /* Only useful $wgParserCacheExpireTime after updating to 1.17 */ |
15 | 16 | |
16 | 17 | /** |
17 | 18 | * Get an instance of this object |
— | — | @@ -118,8 +119,9 @@ |
119 | 120 | $usedOptions = $optionsKey->mUsedOptions; |
120 | 121 | wfDebug( "Parser cache options found.\n" ); |
121 | 122 | } else { |
122 | | - # TODO: Fail here $wgParserCacheExpireTime after deployment unless $useOutdated |
123 | | - |
| 123 | + if ( !$useOutdated && !self::try116cache ) { |
| 124 | + return false; |
| 125 | + } |
124 | 126 | $usedOptions = ParserOptions::legacyOptions(); |
125 | 127 | } |
126 | 128 | |
— | — | @@ -150,6 +152,11 @@ |
151 | 153 | } |
152 | 154 | |
153 | 155 | $value = $this->mMemc->get( $parserOutputKey ); |
| 156 | + if ( self::try116cache && !$value && strpos( $value, '*' ) !== -1 ) { |
| 157 | + wfDebug( "New format parser cache miss.\n" ); |
| 158 | + $parserOutputKey = $this->getParserOutputKey( $article, $popts->optionsHash( ParserOptions::legacyOptions() ) ); |
| 159 | + $value = $this->mMemc->get( $parserOutputKey ); |
| 160 | + } |
154 | 161 | if ( !$value ) { |
155 | 162 | wfDebug( "Parser cache miss.\n" ); |
156 | 163 | wfIncrStats( "pcache_miss_absent" ); |