AndyRussG has uploaded a new change for review.

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

Change subject: MessageCache: some inline comments
......................................................................

MessageCache: some inline comments

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/316368/1

diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 6834ac0..5c0a112 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -502,6 +502,7 @@
                        if ( $text === false ) {
                                // Failed to fetch data; possible ES errors?
                                // Store a marker to fetch on-demand as a 
workaround...
+                               // TODO Use a differnt marker
                                $entry = '!TOO BIG';
                                wfDebugLog(
                                        'MessageCache',
@@ -516,6 +517,10 @@
 
                $cache['VERSION'] = MSG_CACHE_VERSION;
                ksort( $cache );
+
+               # Hash for validating local cache (APC). No need to take into 
account
+               # messages larger than $wgMaxMsgCacheEntrySize, since those are 
only
+               # stored and fetched from memcache.
                $cache['HASH'] = md5( serialize( $cache ) );
                $cache['EXPIRY'] = wfTimestamp( TS_MW, time() + $this->mExpiry 
);
 
@@ -574,7 +579,8 @@
                }
 
                ScopedCallback::consume( $scopedLock );
-               // Relay the purge to APC and other DCs
+               // Relay the purge. Touching this check key expires cache 
contents
+               // and local cache (APC) validation hash across all DCs.
                $this->wanCache->touchCheckKey( wfMemcKey( 'messages', $code ) 
);
 
                // Also delete cached sidebar... just in case it is affected

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42427eef73d86c1a2e99dfa22b5dae159542e243
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