Index: trunk/extensions/Wikilog/Wikilog.php |
— | — | @@ -82,7 +82,6 @@ |
83 | 83 | // WikilogParser.php |
84 | 84 | 'WikilogParser' => $dir . 'WikilogParser.php', |
85 | 85 | 'WikilogParserOutput' => $dir . 'WikilogParser.php', |
86 | | - 'WikilogParserCache' => $dir . 'WikilogParser.php', |
87 | 86 | |
88 | 87 | // WikilogItemPager.php |
89 | 88 | 'WikilogItemPager' => $dir . 'WikilogItemPager.php', |
Index: trunk/extensions/Wikilog/WikilogParser.php |
— | — | @@ -616,33 +616,3 @@ |
617 | 617 | public function getTags() { return $this->mTags; } |
618 | 618 | } |
619 | 619 | |
620 | | -/** |
621 | | - * Since wikilog parses articles with specific options in order to be |
622 | | - * rendered in feeds, it is necessary to store these parsed outputs in |
623 | | - * the cache separately. This derived class from ParserCache overloads the |
624 | | - * getKey() function in order to provide a specific namespace for this |
625 | | - * purpose. |
626 | | - */ |
627 | | -class WikilogParserCache |
628 | | - extends ParserCache |
629 | | -{ |
630 | | - public static function &singleton() { |
631 | | - static $instance; |
632 | | - if ( !isset( $instance ) ) { |
633 | | - global $parserMemc; |
634 | | - $instance = new WikilogParserCache( $parserMemc ); |
635 | | - } |
636 | | - return $instance; |
637 | | - } |
638 | | - |
639 | | - public function getKey( &$article, $popts ) { |
640 | | - if ( $popts instanceof User ) // API change in MediaWiki 1.15. |
641 | | - $popts = ParserOptions::newFromUser( $popts ); |
642 | | - |
643 | | - $user = $popts->mUser; |
644 | | - $pageid = intval( $article->getID() ); |
645 | | - $hash = $user->getPageRenderingHash(); |
646 | | - $key = wfMemcKey( 'wlcache', 'idhash', "$pageid-$hash" ); |
647 | | - return $key; |
648 | | - } |
649 | | -} |
Index: trunk/extensions/Wikilog/WikilogUtils.php |
— | — | @@ -79,15 +79,14 @@ |
80 | 80 | $parserOpt->setTidy( true ); |
81 | 81 | if ( $feed ) { |
82 | 82 | $parserOpt->setEditSection( false ); |
| 83 | + $parserOpt->addExtraKey( "WikilogFeed" ); |
83 | 84 | } else { |
84 | 85 | $parserOpt->enableLimitReport(); |
85 | 86 | } |
86 | 87 | |
87 | 88 | if ( $useParserCache ) { |
88 | 89 | # Select parser cache according to the $feed flag. |
89 | | - $parserCache = $feed |
90 | | - ? WikilogParserCache::singleton() |
91 | | - : ParserCache::singleton(); |
| 90 | + $parserCache = ParserCache::singleton(); |
92 | 91 | |
93 | 92 | # Look for the parsed article output in the parser cache. |
94 | 93 | $parserOutput = $parserCache->get( $article, $parserOpt ); |