From 545ddb0aa633db3de19d4d3b1337bc5a3edbb981 Mon Sep 17 00:00:00 2001 From: "Ian Heggie (OAF)" Date: Sat, 23 May 2026 02:40:08 +1000 Subject: [PATCH] Allow credentials:edit of production on a dev system --- config/environments/production.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 5bc8a8f07..6721d92bc 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -87,8 +87,12 @@ # Set to :debug to see everything in the log config.log_level = :warn - # Use a different cache store in production. - config.cache_store = [:mem_cache_store] + YAML.load_file("config/memcache.yml")["servers"] + # Use memcached for cache store in production, whilst still allowing credentials:edit of production on a dev system + config.cache_store = [:mem_cache_store] + if File.size?("config/memcache.yml") + YAML.load_file("config/memcache.yml")["servers"] + else + ['127.0.0.1'] + end # Use a real queuing backend for Active Job (and separate queues per environment). # config.active_job.queue_adapter = :resque