about summary refs log tree commit diff
path: root/config/environments
diff options
context:
space:
mode:
Diffstat (limited to 'config/environments')
-rw-r--r--config/environments/development.rb8
-rw-r--r--config/environments/production.rb21
2 files changed, 0 insertions, 29 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 4b25ab1a8..58e8a0728 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -16,14 +16,6 @@ Rails.application.configure do
   if Rails.root.join('tmp/caching-dev.txt').exist?
     config.action_controller.perform_caching = true
 
-    config.cache_store = :redis_store, {
-      host: ENV['REDIS_HOST'] || 'localhost',
-      port: ENV['REDIS_PORT'] || 6379,
-      db: 0,
-      namespace: 'cache',
-      expires_in: 1.minute,
-    }
-
     config.public_file_server.headers = {
       'Cache-Control' => 'public, max-age=172800',
     }
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 1f2b5e05d..3cbf5f899 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -45,27 +45,6 @@ Rails.application.configure do
   # Use a different logger for distributed setups.
   # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
 
-  # Parse and split the REDIS_URL if passed (used with hosting platforms such as Heroku).
-  # Set ENV variables because they are used elsewhere.
-  if ENV['REDIS_URL']
-    redis_url = URI.parse(ENV['REDIS_URL'])
-    ENV['REDIS_HOST'] = redis_url.host
-    ENV['REDIS_PORT'] = redis_url.port.to_s
-    ENV['REDIS_PASSWORD'] = redis_url.password
-    db_num = redis_url.path[1..-1]
-    ENV['REDIS_DB'] = db_num if db_num.present?
-  end
-
-  # Use a different cache store in production.
-  config.cache_store = :redis_store, {
-    host: ENV.fetch('REDIS_HOST') { 'localhost' },
-    port: ENV.fetch('REDIS_PORT') { 6379 },
-    password: ENV.fetch('REDIS_PASSWORD') { false },
-    db: ENV.fetch('REDIS_DB') { 0 },
-    namespace: 'cache',
-    expires_in: 10.minutes,
-  }
-
   # Enable serving of images, stylesheets, and JavaScripts from an asset server.
   # config.action_controller.asset_host = 'http://assets.example.com'