summaryrefslogtreecommitdiff
path: root/lib/gitlab/performance_bar.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/performance_bar.rb')
-rw-r--r--lib/gitlab/performance_bar.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/performance_bar.rb b/lib/gitlab/performance_bar.rb
index 92a308a12dc..fda61000f6a 100644
--- a/lib/gitlab/performance_bar.rb
+++ b/lib/gitlab/performance_bar.rb
@@ -15,6 +15,7 @@ module Gitlab
Gitlab::CurrentSettings.performance_bar_allowed_group_id
end
+ # rubocop: disable CodeReuse/ActiveRecord
def self.allowed_user_ids
Rails.cache.fetch(ALLOWED_USER_IDS_KEY, expires_in: EXPIRY_TIME) do
group = Group.find_by_id(allowed_group_id)
@@ -26,6 +27,7 @@ module Gitlab
end
end
end
+ # rubocop: enable CodeReuse/ActiveRecord
def self.expire_allowed_user_ids_cache
Rails.cache.delete(ALLOWED_USER_IDS_KEY)