1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/cache
Michael Overmeyer 71963b1fc9 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.
2021-02-09 09:34:10 -05:00
..
behaviors Support aliases to expires_in for cache stores 2020-12-28 17:15:43 -08:00
stores Allow addresses to support nil values 2021-02-09 09:34:10 -05:00
behaviors.rb Make AS::Cache coder configurable 2020-10-14 12:12:36 +02:00
cache_entry_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
cache_key_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
cache_store_logger_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
cache_store_namespace_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
cache_store_setting_test.rb Restore the lookup_store compatibility to accept config as a single object 2020-03-25 06:05:57 +09:00
local_cache_middleware_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00