jenkins-bot has submitted this change and it was merged.
Change subject: Split memcached for Wikibase diff view body content by lang
......................................................................
Split memcached for Wikibase diff view body content by lang
Bug: 55667
Change-Id: I3af6be0813ad1e4f1febb1fb16ec16f0bf76c050
---
M repo/includes/EntityContentDiffView.php
1 file changed, 12 insertions(+), 1 deletion(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/includes/EntityContentDiffView.php
b/repo/includes/EntityContentDiffView.php
index 7968141..9a05b62 100644
--- a/repo/includes/EntityContentDiffView.php
+++ b/repo/includes/EntityContentDiffView.php
@@ -40,7 +40,7 @@
//TODO: proper injection
$options = new FormatterOptions( array(
//TODO: fallback chain
- ValueFormatter::OPT_LANG =>
$this->getContext()->getLanguage()->getCode()
+ ValueFormatter::OPT_LANG =>
$this->getLanguage()->getCode()
) );
$this->propertyNameFormatter = new EntityIdLabelFormatter(
$options, WikibaseRepo::getDefaultInstance()->getEntityLookup() );
@@ -155,4 +155,15 @@
return $parserOutput;
}
+ /**
+ * Returns the cache key for diff body text or content.
+ *
+ * @return string
+ */
+ protected function getDiffBodyCacheKey() {
+ return wfMemcKey( 'diff', 'version', MW_DIFF_VERSION,
+ 'oldid', $this->getOldid(), 'newid', $this->getNewid(),
+ 'lang', $this->getLanguage()->getCode() );
+ }
+
}
--
To view, visit https://gerrit.wikimedia.org/r/92863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3af6be0813ad1e4f1febb1fb16ec16f0bf76c050
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits