From aed863a6f3b5dabdc33070f2716ed0713169188f Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 17 Aug 2022 19:12:54 -0400 Subject: [PATCH] fix for cache config. Use memory for now as we do no cache much --- config/environments/production.rb | 6 +++++- config/environments/staging.rb | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 217c0f76a..9d45caf19 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -54,7 +54,11 @@ config.log_tags = [ :request_id ] # Use a different cache store in production. - config.cache_store = :mem_cache_store + # config.cache_store = :mem_cache_store + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{10.minutes.to_i}" + } # Use a real queuing backend for Active Job (and separate queues per environment). config.active_job.queue_adapter = :sidekiq diff --git a/config/environments/staging.rb b/config/environments/staging.rb index de4c2acf7..1bb4f439b 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -54,7 +54,11 @@ config.log_tags = [ :request_id ] # Use a different cache store in staging. - config.cache_store = :mem_cache_store + # config.cache_store = :mem_cache_store + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{10.minutes.to_i}" + } # Use a real queuing backend for Active Job (and separate queues per environment). config.active_job.queue_adapter = :sidekiq