Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Remove CacheEpoch from 
MessageBlobStore::getFromDB
......................................................................

resourceloader: Remove CacheEpoch from MessageBlobStore::getFromDB

CacheEpoch isn't meant for this (it's meant for page cache), I can't
imagine a scenario in which we'd want to bump that to invalidate
MessageBlobStore. It should be standalone and can be easily cleared
if needed by truncating the relevant table (it's automatically
repopulated).

This also removes wfTimestamp/DateTime overhead.

Change-Id: Iab06edbf71f20f3430207a80df90131c79dc03a7
---
M includes/cache/MessageBlobStore.php
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/247723/1

diff --git a/includes/cache/MessageBlobStore.php 
b/includes/cache/MessageBlobStore.php
index 63d8c7e..e33fd90 100644
--- a/includes/cache/MessageBlobStore.php
+++ b/includes/cache/MessageBlobStore.php
@@ -392,11 +392,9 @@
 
                        // Update the module's blobs if the set of messages 
changed or if the blob is
                        // older than the CacheEpoch setting
-                       $keys = array_keys( FormatJson::decode( $row->mr_blob, 
true ) );
-                       $values = array_values( array_unique( 
$module->getMessages() ) );
-                       if ( $keys !== $values
-                               || wfTimestamp( TS_MW, $row->mr_timestamp ) <= 
$config->get( 'CacheEpoch' )
-                       ) {
+                       $blobKeys = array_keys( FormatJson::decode( 
$row->mr_blob, true ) );
+                       $moduleMsgs = array_values( array_unique( 
$module->getMessages() ) );
+                       if ( $blobKeys !== $moduleMsgs ) {
                                $retval[$row->mr_resource] = 
$this->updateModule( $row->mr_resource, $module, $lang );
                        } else {
                                $retval[$row->mr_resource] = $row->mr_blob;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab06edbf71f20f3430207a80df90131c79dc03a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to