Handle missing parser cache keys better in pool counter
authorChad Horohoe <chadh@wikimedia.org>
Wed, 19 Nov 2014 19:22:03 +0000 (11:22 -0800)
committerChad Horohoe <chadh@wikimedia.org>
Wed, 19 Nov 2014 19:22:48 +0000 (11:22 -0800)
Change-Id: I493fd1ee5e9ab6c3a49a7f478460cbfe54393ca0

includes/poolcounter/PoolWorkArticleView.php

index 5e7e391..da20f94 100644 (file)
@@ -67,7 +67,8 @@ class PoolWorkArticleView extends PoolCounterWork {
                $this->parserOptions = $parserOptions;
                $this->content = $content;
                $this->cacheKey = ParserCache::singleton()->getKey( $page, $parserOptions );
-               parent::__construct( 'ArticleView', $this->cacheKey . ':revid:' . $revid );
+               $keyPrefix = $this->cacheKey ?: wfMemcKey( 'articleview', 'missingcachekey' );
+               parent::__construct( 'ArticleView', $keyPrefix . ':revid:' . $revid );
        }
 
        /**