Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow addresses to support nil values #41381

Merged
merged 1 commit into from Feb 9, 2021
Merged

Allow addresses to support nil values #41381

merged 1 commit into from Feb 9, 2021

Commits on Feb 9, 2021

  1. 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.
    movermeyer committed Feb 9, 2021
    Copy the full SHA
    71963b1 View commit details
    Browse the repository at this point in the history