In ParserCache, respect $useOutdated
authorTim Starling <tstarling@wikimedia.org>
Tue, 26 Apr 2016 06:28:38 +0000 (16:28 +1000)
committerTim Starling <tstarling@wikimedia.org>
Tue, 26 Apr 2016 09:41:36 +0000 (09:41 +0000)
$useOutdated was broken by Ifcc4d2f67f3b77, which forces the cached entry
to always have the same revision ID as the latest revision. This
probably caused the "pool queue is full" errors reported after Prince's
death was announced.

Bug: T133659
Change-Id: Ibd111bed203dd72103d772d8dcba4f0d943124fd

includes/parser/ParserCache.php

index 916cfc2..8d626db 100644 (file)
@@ -149,7 +149,7 @@ class ParserCache {
                                wfDebug( "Parser options key expired, touched " . $article->getTouched()
                                        . ", epoch $wgCacheEpoch, cached $cacheTime\n" );
                                return false;
-                       } elseif ( $optionsKey->isDifferentRevision( $article->getLatest() ) ) {
+                       } elseif ( !$useOutdated && $optionsKey->isDifferentRevision( $article->getLatest() ) ) {
                                wfIncrStats( "pcache.miss.revid" );
                                $revId = $article->getLatest();
                                $cachedRevId = $optionsKey->getCacheRevisionId();
@@ -225,7 +225,7 @@ class ParserCache {
                        wfDebug( "ParserOutput key expired, touched $touched, "
                                . "epoch $wgCacheEpoch, cached $cacheTime\n" );
                        $value = false;
-               } elseif ( $value->isDifferentRevision( $article->getLatest() ) ) {
+               } elseif ( !$useOutdated && $value->isDifferentRevision( $article->getLatest() ) ) {
                        wfIncrStats( "pcache.miss.revid" );
                        $revId = $article->getLatest();
                        $cachedRevId = $value->getCacheRevisionId();