Removed const ParserCache::try116cache
authortonythomas01 <01tonythomas@gmail.com>
Mon, 30 Dec 2013 18:54:29 +0000 (00:24 +0530)
committertonythomas01 <01tonythomas@gmail.com>
Mon, 30 Dec 2013 19:06:58 +0000 (00:36 +0530)
Version 1.16 is long ago and there seems no need to keep the const
ParserCache::try116cache in core.
Removed the if(self:: try116cache) block

Bug: 59127
Change-Id: I705a056665441f81516a4dbb6fe317a44da91d43

includes/parser/ParserCache.php

index 7043b4a..bad0482 100644 (file)
@@ -27,8 +27,7 @@
  */
 class ParserCache {
        private $mMemc;
-       const try116cache = false; /* Only useful $wgParserCacheExpireTime after updating to 1.17 */
-
+       
        /**
         * Get an instance of this object
         *
@@ -146,7 +145,7 @@ class ParserCache {
                        $usedOptions = $optionsKey->mUsedOptions;
                        wfDebug( "Parser cache options found.\n" );
                } else {
-                       if ( !$useOutdated && !self::try116cache ) {
+                       if ( !$useOutdated ) {
                                return false;
                        }
                        $usedOptions = ParserOptions::legacyOptions();
@@ -186,12 +185,6 @@ class ParserCache {
                }
 
                $value = $this->mMemc->get( $parserOutputKey );
-               if ( self::try116cache && !$value && strpos( $value, '*' ) !== -1 ) {
-                       wfDebug( "New format parser cache miss.\n" );
-                       $parserOutputKey = $this->getParserOutputKey( $article,
-                               $popts->optionsHash( ParserOptions::legacyOptions(), $article->getTitle() ) );
-                       $value = $this->mMemc->get( $parserOutputKey );
-               }
                if ( !$value ) {
                        wfDebug( "ParserOutput cache miss.\n" );
                        wfIncrStats( "pcache_miss_absent" );