Merge "Removed obsolete "containsOldMagic" code"
[lhc/web/wiklou.git] / includes / poolcounter / PoolWorkArticleView.php
index 5e7e391..a702d2e 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 );
        }
 
        /**
@@ -153,12 +154,12 @@ class PoolWorkArticleView extends PoolCounterWork {
                // Make sure file cache is not used on uncacheable content.
                // Output that has magic words in it can still use the parser cache
                // (if enabled), though it will generally expire sooner.
-               if ( !$this->parserOutput->isCacheable() || $this->parserOutput->containsOldMagic() ) {
+               if ( !$this->parserOutput->isCacheable() ) {
                        $wgUseFileCache = false;
                }
 
                if ( $isCurrent ) {
-                       $this->page->doCascadeProtectionUpdates( $this->parserOutput );
+                       $this->page->triggerOpportunisticLinksUpdate( $this->parserOutput );
                }
 
                return true;