AndyRussG has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316383

Change subject: MessageCache: Use checkKeys for large messages
......................................................................

MessageCache: Use checkKeys for large messages

Bug: T144952
Change-Id: Ic1c649478b0f87420052d8c99b2962920f8b5c96
---
M includes/cache/MessageCache.php
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/316383/1

diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 6834ac0..94e73d6 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -948,7 +948,15 @@
 
                # Try the individual message cache
                $titleKey = wfMemcKey( 'messages', 'individual', $title );
-               $entry = $this->wanCache->get( $titleKey );
+
+               $curTTL = null;
+               $entry = $this->wanCache->get(
+                       $titleKey,
+                       $curTTL,
+                       [ wfMemcKey( 'messages', $code ) ]
+               );
+               $entry = ( $curTTL >= 0 ) ? $entry : null;
+
                if ( $entry ) {
                        if ( substr( $entry, 0, 1 ) === ' ' ) {
                                $this->mCache[$code][$title] = $entry;

-- 
To view, visit https://gerrit.wikimedia.org/r/316383
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1c649478b0f87420052d8c99b2962920f8b5c96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <andrew.green...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to