Only set memcache hash when saving messages to memcache
authorElliott Eggleston <ejegg@ejegg.com>
Thu, 13 Oct 2016 17:55:01 +0000 (12:55 -0500)
committerElliott Eggleston <ejegg@ejegg.com>
Thu, 13 Oct 2016 17:57:32 +0000 (12:57 -0500)
Shouldn't need to change the memcache hash unless we're changing the
memcache value.

Bug: T144952
Change-Id: I8e5cc29bfa0372f0071914e534e0b80cc4d34286

includes/cache/MessageCache.php

index f393acd..6834ac0 100644 (file)
@@ -631,11 +631,11 @@ class MessageCache {
                if ( $dest === 'all' ) {
                        $cacheKey = wfMemcKey( 'messages', $code );
                        $success = $this->mMemc->set( $cacheKey, $cache );
+                       $this->setValidationHash( $code, $cache );
                } else {
                        $success = true;
                }
 
-               $this->setValidationHash( $code, $cache );
                $this->saveToLocalCache( $code, $cache );
 
                return $success;