From 4529f474441ba07a4154c41f27fdb86a920088a5 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 3 May 2017 00:41:12 -0400 Subject: [PATCH] switch rails caching from memcachier to heroku-redis We don't really care between the two, and this should keep all of our billing at Heroku (which can then be part of a single sponsorship). --- Gemfile | 3 +-- Gemfile.lock | 24 +++++++++++++++++++----- config/environments/production.rb | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 15db2e59e..bb0de83f2 100644 --- a/Gemfile +++ b/Gemfile @@ -5,11 +5,10 @@ gem 'rails', '4.2.6' gem 'rails_12factor', group: :production gem 'asciidoctor', '>=1.5.4' -gem 'dalli' +gem 'redis-rails' gem 'exceptional' gem 'faraday' gem 'faraday_middleware' -gem 'memcachier' gem 'octokit' gem "pg" gem 'rack-timeout' diff --git a/Gemfile.lock b/Gemfile.lock index deb9489d6..bbe91ed57 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,7 +71,6 @@ GEM compass (>= 0.12.2) crack (0.4.2) safe_yaml (~> 1.0.0) - dalli (2.7.2) database_cleaner (1.3.0) debug_inspector (0.0.2) debugger-linecache (1.2.0) @@ -112,7 +111,6 @@ GEM nokogiri (>= 1.5.9) mail (2.6.3) mime-types (>= 1.16, < 3) - memcachier (0.0.2) mime-types (1.25.1) mini_portile2 (2.0.0) minitest (5.8.4) @@ -163,6 +161,23 @@ GEM rdoc (4.1.1) json (~> 1.4) redcarpet (3.2.3) + redis (3.3.3) + redis-actionpack (5.0.1) + actionpack (>= 4.0, < 6) + redis-rack (>= 1, < 3) + redis-store (>= 1.1.0, < 1.4.0) + redis-activesupport (5.0.2) + activesupport (>= 3, < 6) + redis-store (~> 1.3.0) + redis-rack (2.0.2) + rack (>= 1.5, < 3) + redis-store (>= 1.2, < 1.4) + redis-rails (5.0.2) + redis-actionpack (>= 5.0, < 6) + redis-activesupport (>= 5.0, < 6) + redis-store (>= 1.2, < 2) + redis-store (1.3.0) + redis (>= 2.2) rest-client (1.6.8) mime-types (~> 1.16) rdoc (>= 2.4.2) @@ -252,7 +267,6 @@ DEPENDENCIES byebug coffee-rails compass-rails - dalli database_cleaner diff-lcs dotenv-rails @@ -265,7 +279,6 @@ DEPENDENCIES jquery-rails json launchy - memcachier netrc nokogiri octokit @@ -275,6 +288,7 @@ DEPENDENCIES rails-perftest rails_12factor redcarpet + redis-rails rspec-rails ruby-prof rubyzip @@ -293,4 +307,4 @@ RUBY VERSION ruby 2.1.8p440 BUNDLED WITH - 1.13.6 + 1.14.6 diff --git a/config/environments/production.rb b/config/environments/production.rb index 00062ab61..f235047f3 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -53,7 +53,7 @@ Rails.application.configure do # Use a different cache store in production. # config.cache_store = :mem_cache_store - config.cache_store = :dalli_store + config.cache_store = :redis_store, ENV['REDIS_URL'] # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com"