From 3abfc33cc01a51b6efc9037948b8b6a711f30ba5 Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Fri, 24 Jun 2022 10:54:24 +0100 Subject: [PATCH] Cache allowlist et al in analytics.rb config_for doesn't cache (!) --- lib/dfe/analytics.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dfe/analytics.rb b/lib/dfe/analytics.rb index a271875a..6d31d4b5 100644 --- a/lib/dfe/analytics.rb +++ b/lib/dfe/analytics.rb @@ -79,15 +79,15 @@ def self.enabled? end def self.allowlist - Rails.application.config_for(:analytics) + @allowlist ||= Rails.application.config_for(:analytics) end def self.allowlist_pii - Rails.application.config_for(:analytics_pii) + @allowlist_pii ||= Rails.application.config_for(:analytics_pii) end def self.blocklist - Rails.application.config_for(:analytics_blocklist) + @blocklist ||= Rails.application.config_for(:analytics_blocklist) end def self.environment