aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/CHANGELOG.md56
1 files changed, 29 insertions, 27 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 24c7f362e9..4762c7d21d 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,32 +1,34 @@
* Redis cache store.
- # Defaults to `redis://localhost:6379/0`. Only use for dev/test.
- config.cache_store = :redis_cache_store
-
- # Supports all common cache store options (:namespace, :compress,
- # :compress_threshold, :expires_in, :race_condition_tool) and all
- # Redis options.
- cache_password = Rails.application.secrets.redis_cache_password
- config.cache_store = :redis_cache_store, driver: :hiredis,
- namespace: 'myapp-cache', compress: true, timeout: 1,
- url: "redis://:#{cache_password}@myapp-cache-1:6379/0"
-
- # Supports Redis::Distributed with multiple hosts
- config.cache_store = :redis_cache_store, driver: :hiredis
- namespace: 'myapp-cache', compress: true,
- url: %w[
- redis://myapp-cache-1:6379/0
- redis://myapp-cache-1:6380/0
- redis://myapp-cache-2:6379/0
- redis://myapp-cache-2:6380/0
- redis://myapp-cache-3:6379/0
- redis://myapp-cache-3:6380/0
- ]
-
- # Or pass a builder block
- config.cache_store = :redis_cache_store,
- namespace: 'myapp-cache', compress: true,
- redis: -> { Redis.new … }
+ ```
+ # Defaults to `redis://localhost:6379/0`. Only use for dev/test.
+ config.cache_store = :redis_cache_store
+
+ # Supports all common cache store options (:namespace, :compress,
+ # :compress_threshold, :expires_in, :race_condition_tool) and all
+ # Redis options.
+ cache_password = Rails.application.secrets.redis_cache_password
+ config.cache_store = :redis_cache_store, driver: :hiredis,
+ namespace: 'myapp-cache', compress: true, timeout: 1,
+ url: "redis://:#{cache_password}@myapp-cache-1:6379/0"
+
+ # Supports Redis::Distributed with multiple hosts
+ config.cache_store = :redis_cache_store, driver: :hiredis
+ namespace: 'myapp-cache', compress: true,
+ url: %w[
+ redis://myapp-cache-1:6379/0
+ redis://myapp-cache-1:6380/0
+ redis://myapp-cache-2:6379/0
+ redis://myapp-cache-2:6380/0
+ redis://myapp-cache-3:6379/0
+ redis://myapp-cache-3:6380/0
+ ]
+
+ # Or pass a builder block
+ config.cache_store = :redis_cache_store,
+ namespace: 'myapp-cache', compress: true,
+ redis: -> { Redis.new … }
+ ```
Deployment note: Take care to use a *dedicated Redis cache* rather
than pointing this at your existing Redis server. It won't cope well