FIX: upgrade resilient distributed cache

only load messages in distributed cache if discourse version matches
This commit is contained in:
Sam 2015-05-22 11:20:41 +10:00
parent df5be88a77
commit 17d843a0ad

View File

@ -26,6 +26,7 @@ class DistributedCache
next if payload["origin"] == current.identity
next if current.key != payload["hash_key"]
next if payload["discourse_version"] != Discourse.git_version
hash = current.hash(message.site_id)
@ -63,6 +64,7 @@ class DistributedCache
def self.publish(hash, message)
message[:origin] = hash.identity
message[:hash_key] = hash.key
message[:discourse_version] = Discourse.git_version
MessageBus.publish(channel_name, message, { user_ids: [-1] })
end