From 15ba85ab8e6c0f3dd18663233fd86bcb3bde4e73 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 5 Jun 2019 23:24:38 +0300 Subject: Remove some deprecated code Signed-off-by: Dmitriy Zaporozhets --- app/models/broadcast_message.rb | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'app/models/broadcast_message.rb') diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb index 18fe2a9624f..0fd8dca70b4 100644 --- a/app/models/broadcast_message.rb +++ b/app/models/broadcast_message.rb @@ -17,13 +17,11 @@ class BroadcastMessage < ApplicationRecord default_value_for :font, '#FFFFFF' CACHE_KEY = 'broadcast_message_current_json'.freeze - LEGACY_CACHE_KEY = 'broadcast_message_current'.freeze after_commit :flush_redis_cache def self.current messages = cache.fetch(CACHE_KEY, as: BroadcastMessage, expires_in: cache_expires_in) do - remove_legacy_cache_key current_and_future_messages end @@ -50,14 +48,6 @@ class BroadcastMessage < ApplicationRecord nil end - # This can be removed in GitLab 12.0+ - # The old cache key had an indefinite lifetime, and in an HA - # environment a one-shot migration would not work because the cache - # would be repopulated by a node that has not been upgraded. - def self.remove_legacy_cache_key - cache.expire(LEGACY_CACHE_KEY) - end - def active? started? && !ended? end @@ -84,6 +74,5 @@ class BroadcastMessage < ApplicationRecord def flush_redis_cache self.class.cache.expire(CACHE_KEY) - self.class.remove_legacy_cache_key end end -- cgit v1.2.1