Jackmcbarn has uploaded a new change for review. https://gerrit.wikimedia.org/r/226468
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 79df04453e4493c0402d4604f7b29da10cdf2ee5. Change-Id: Ic922a49af0c20fab84db201b8cb5aabf107c659a --- M common/Base.php 1 file changed, 2 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/68/226468/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/226468 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic922a49af0c20fab84db201b8cb5aabf107c659a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: wmf/1.26wmf15 Gerrit-Owner: Jackmcbarn <jackmcb...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits