diff --git a/lib/content_security_policy/extension.rb b/lib/content_security_policy/extension.rb index 36a3ed8df55..6996e6747de 100644 --- a/lib/content_security_policy/extension.rb +++ b/lib/content_security_policy/extension.rb @@ -27,7 +27,7 @@ class ContentSecurityPolicy def theme_extensions(theme_id) key = "theme_extensions_#{theme_id}" - cache[key] ||= find_theme_extensions(theme_id) + cache.defer_get_set(key) { find_theme_extensions(theme_id) } end def clear_theme_extensions_cache!