MessageCache: derive the hash from the cache contents
[lhc/web/wiklou.git] / includes / cache / MessageCache.php
index 304c4f2..3f60d8c 100644 (file)
@@ -530,7 +530,8 @@ class MessageCache {
                }
 
                $cache['VERSION'] = MSG_CACHE_VERSION;
-               $cache['HASH'] = wfRandomString( 8 );
+               ksort( $cache );
+               $cache['HASH'] = md5( serialize( $cache ) );
                $cache['EXPIRY'] = wfTimestamp( TS_MW, time() + $this->mExpiry );
 
                return $cache;