未验证 提交 ba1e153e 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #31155 from bogdanvlviv/fix-activesupport-changelog

Fix activesupport/CHANGELOG.md [ci skip]
* 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册