jenkins-bot has submitted this change and it was merged.

Change subject: Made MessageCache use the WAN cache for individual cache keys
......................................................................


Made MessageCache use the WAN cache for individual cache keys

* These keys are used for larger messages not in the main blob,
  and they still use explicit purges as the pages change

Change-Id: I254ddcc9ffe7c49654788d6aabcca2ab7ed4f03f
---
M includes/cache/MessageCache.php
1 file changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Nikerabbit: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index fef544a..142dacf 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -559,14 +559,14 @@
                if ( $text === false ) {
                        # Article was deleted
                        $this->mCache[$code][$title] = '!NONEXISTENT';
-                       $this->mMemc->delete( $titleKey );
+                       $this->wanCache->delete( $titleKey );
                } elseif ( strlen( $text ) > $wgMaxMsgCacheEntrySize ) {
                        # Check for size
                        $this->mCache[$code][$title] = '!TOO BIG';
-                       $this->mMemc->set( $titleKey, ' ' . $text, 
$this->mExpiry );
+                       $this->wanCache->set( $titleKey, ' ' . $text, 
$this->mExpiry );
                } else {
                        $this->mCache[$code][$title] = ' ' . $text;
-                       $this->mMemc->delete( $titleKey );
+                       $this->wanCache->delete( $titleKey );
                }
 
                # Update caches
@@ -920,7 +920,7 @@
 
                # Try the individual message cache
                $titleKey = wfMemcKey( 'messages', 'individual', $title );
-               $entry = $this->mMemc->get( $titleKey );
+               $entry = $this->wanCache->get( $titleKey );
                if ( $entry ) {
                        if ( substr( $entry, 0, 1 ) === ' ' ) {
                                $this->mCache[$code][$title] = $entry;
@@ -934,7 +934,7 @@
                                return false;
                        } else {
                                # Corrupt/obsolete entry, delete it
-                               $this->mMemc->delete( $titleKey );
+                               $this->wanCache->delete( $titleKey );
                        }
                }
 
@@ -968,7 +968,7 @@
                                        $message = false; // negative caching
                                } else {
                                        $this->mCache[$code][$title] = ' ' . 
$message;
-                                       $this->mMemc->set( $titleKey, ' ' . 
$message, $this->mExpiry );
+                                       $this->wanCache->set( $titleKey, ' ' . 
$message, $this->mExpiry );
                                }
                        }
                } else {
@@ -977,7 +977,7 @@
 
                if ( $message === false ) { // negative caching
                        $this->mCache[$code][$title] = '!NONEXISTENT';
-                       $this->mMemc->set( $titleKey, '!NONEXISTENT', 
$this->mExpiry );
+                       $this->wanCache->set( $titleKey, '!NONEXISTENT', 
$this->mExpiry );
                }
 
                return $message;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I254ddcc9ffe7c49654788d6aabcca2ab7ed4f03f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to