From 025d70dd130702be957497a5a8a0985095246c5e Mon Sep 17 00:00:00 2001 From: Rosa Gutierrez Date: Wed, 7 Jan 2026 14:13:15 +0100 Subject: [PATCH] Use separate cache namespaces for each beta instance Otherwise we end up with views including URLs from all the betas, leading to some confusion and problems with the CSP. --- config/cache.yml | 2 +- saas/config/deploy.beta.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/cache.yml b/config/cache.yml index d1716bb58..302a4f878 100644 --- a/config/cache.yml +++ b/config/cache.yml @@ -1,7 +1,7 @@ default_options: &default_options store_options: max_age: <%= 60.days.to_i %> - namespace: <%= Rails.env %> + namespace: <%= "#{Rails.env}#{"-#{ENV["CACHE_NAMESPACE"]}" if ENV["CACHE_NAMESPACE"]}" %> default_connection: &default_connection database: cache diff --git a/saas/config/deploy.beta.yml b/saas/config/deploy.beta.yml index 14bf89698..d5fce9d32 100644 --- a/saas/config/deploy.beta.yml +++ b/saas/config/deploy.beta.yml @@ -75,6 +75,7 @@ ssh: env: clear: APP_FQDN: beta<%= @beta_number %>.fizzy-beta.com + CACHE_NAMESPACE: <%= @beta_number %> RAILS_ENV: beta RAILS_LOG_LEVEL: fatal # suppress unstructured log lines MYSQL_DATABASE_HOST: fizzy-mysql-primary