File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 22SECRET_KEY_BASE = change-me-generate-with-bin-rails-secret
33DATABASE_URL = postgres://postgres@localhost:5432/spree_production
44REDIS_URL = redis://localhost:6379/0
5+ # REDIS_CACHE_URL=redis://localhost:6380/0 # dedicated cache Redis (falls back to REDIS_URL)
56
67# Web Server
78PORT = 3000
Original file line number Diff line number Diff line change 5353 # Don't log any deprecations.
5454 config . active_support . report_deprecations = false
5555
56- # Use Redis for caching if REDIS_URL is set, otherwise fall back to memory store.
57- if ENV [ "REDIS_URL" ] . present?
58- config . cache_store = :redis_cache_store , { url : ENV [ "REDIS_URL" ] }
56+ # Use Redis for caching. REDIS_CACHE_URL allows a dedicated cache Redis,
57+ # falling back to REDIS_URL (shared with Sidekiq) if not set.
58+ redis_cache_url = ENV [ "REDIS_CACHE_URL" ] || ENV [ "REDIS_URL" ]
59+ if redis_cache_url . present?
60+ config . cache_store = :redis_cache_store , { url : redis_cache_url }
5961 else
6062 config . cache_store = :memory_store
6163 end
You can’t perform that action at this time.
0 commit comments