Jackmcbarn has uploaded a new change for review. https://gerrit.wikimedia.org/r/226467
Change subject: Revert "Add an additional cache layer for module revision text" ...................................................................... Revert "Add an additional cache layer for module revision text" This is damaging links tables in production, and there's really no way to fix them without rebuilding them all (which isn't likely), so we should minimize the damage by reverting this sooner rather than later. This reverts commit c911fc01fd33d5f05bd938584ea7263362bb65b4. Change-Id: Icfedcbfc12d7cc528eea626901c7f46de214db38 --- M common/Base.php 1 file changed, 2 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/67/226467/1 diff --git a/common/Base.php b/common/Base.php index c18d149..9fa6907 100644 --- a/common/Base.php +++ b/common/Base.php @@ -80,9 +80,7 @@ /** * @param $options array Associative array of options: - * - parser: A Parser object - * - title: A Title object - * - cache: A BagOStuff object + * - parser: A Parser object */ public function __construct( array $options ) { $this->options = $options; @@ -91,11 +89,6 @@ } if ( isset( $options['title'] ) ) { $this->title = $options['title']; - } - if ( isset( $options['cache'] ) ) { - $this->cache = $options['cache']; - } else { - $this->cache = ObjectCache::newAccelerator( array(), 'hash' ); } } @@ -108,7 +101,6 @@ $this->parser = null; $this->title = null; $this->modules = null; - $this->cache = null; } /** @@ -158,13 +150,7 @@ function fetchModuleFromParser( Title $title ) { $key = $title->getPrefixedDBkey(); if ( !array_key_exists( $key, $this->modules ) ) { - $cacheKey = wfMemcKey( __CLASS__, $key ); - $templateAndTitle = $this->cache->get( $cacheKey ); - if ( $templateAndTitle === false ) { - $templateAndTitle = $this->parser->fetchTemplateAndTitle( $title ); - $this->cache->set( $cacheKey , $templateAndTitle, 60 ); - } - list( $text, $finalTitle ) = $templateAndTitle; + list( $text, $finalTitle ) = $this->parser->fetchTemplateAndTitle( $title ); if ( $text === false ) { $this->modules[$key] = null; return null; -- To view, visit https://gerrit.wikimedia.org/r/226467 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfedcbfc12d7cc528eea626901c7f46de214db38 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: wmf/1.26wmf14 Gerrit-Owner: Jackmcbarn <jackmcb...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits