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

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

Fix activesupport/CHANGELOG.md [ci skip]
* Redis cache store. * Redis cache store.
# Defaults to `redis://localhost:6379/0`. Only use for dev/test. ```
config.cache_store = :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 # Supports all common cache store options (:namespace, :compress,
# Redis options. # :compress_threshold, :expires_in, :race_condition_tool) and all
cache_password = Rails.application.secrets.redis_cache_password # Redis options.
config.cache_store = :redis_cache_store, driver: :hiredis, cache_password = Rails.application.secrets.redis_cache_password
namespace: 'myapp-cache', compress: true, timeout: 1, config.cache_store = :redis_cache_store, driver: :hiredis,
url: "redis://:#{cache_password}@myapp-cache-1:6379/0" 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 # Supports Redis::Distributed with multiple hosts
namespace: 'myapp-cache', compress: true, config.cache_store = :redis_cache_store, driver: :hiredis
url: %w[ namespace: 'myapp-cache', compress: true,
redis://myapp-cache-1:6379/0 url: %w[
redis://myapp-cache-1:6380/0 redis://myapp-cache-1:6379/0
redis://myapp-cache-2:6379/0 redis://myapp-cache-1:6380/0
redis://myapp-cache-2:6380/0 redis://myapp-cache-2:6379/0
redis://myapp-cache-3:6379/0 redis://myapp-cache-2:6380/0
redis://myapp-cache-3: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, # Or pass a builder block
namespace: 'myapp-cache', compress: true, config.cache_store = :redis_cache_store,
redis: -> { Redis.new … } namespace: 'myapp-cache', compress: true,
redis: -> { Redis.new … }
```
Deployment note: Take care to use a *dedicated Redis cache* rather Deployment note: Take care to use a *dedicated Redis cache* rather
than pointing this at your existing Redis server. It won't cope well 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.
先完成此消息的编辑!
想要评论请 注册