Skip to content

Commit 27f29bf

Browse files
authored
Merge pull request #283 from tansengming/feature/cache-store
stop having a default cache store
2 parents 6da48a5 + 1f96ea4 commit 27f29bf

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

config/application.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ module RailsBase
1010
class Application < Rails::Application
1111
config.middleware.use Rack::Attack
1212

13-
config.cache_store = :redis_store, ENV['REDIS_URL']
14-
1513
config.active_job.queue_adapter = :sidekiq
1614
config.active_job.queue_name_prefix = "rails5_#{Rails.env}"
1715

config/environments/production.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
# Use a different cache store in production.
5353
# config.cache_store = :mem_cache_store
54+
config.cache_store = :redis_store, ENV.fetch('REDIS_URL')
5455

5556
# Use a real queuing backend for Active Job (and separate queues per environment)
5657
# config.active_job.queue_adapter = :resque

config/environments/staging.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
# Use a different cache store in production.
5353
# config.cache_store = :mem_cache_store
54+
config.cache_store = :redis_store, ENV.fetch('REDIS_URL')
5455

5556
# Use a real queuing backend for Active Job (and separate queues per environment)
5657
# config.active_job.queue_adapter = :resque

config/environments/test.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
Rails.application.configure do
2-
config.cache_store = :null_store
3-
42
# Settings specified here will take precedence over those in config/application.rb.
53

64
# The test environment is used exclusively to run your application's

0 commit comments

Comments
 (0)