Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow addresses to support
nil
values
Users of `:dalli_store` may have been passing an explicit `nil` parameter for the servers: ```ruby config.cache_store = :dalli_cache, nil, { expires_in: 2.hour, compress: true } ``` If they simply changed `:dalli_cache` and `:mem_cache_store`, the existing code passes `addresses = [nil]` to Dalli (instead of `nil`), which cause exceptions when people try to access the cache: ``` > Rails.cache.fetch('foo') NoMethodError: undefined method `match' for nil:NilClass ``` This change allows users to continue passing the explicit `nil`, making migrations from `:dalli_store` to `:mem_cache_store` simpler.
- Loading branch information
1 parent
cc9814c
commit 71963b1
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters