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/stores
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
..
file_store_test.rb Make AS::Cache coder configurable 2020-10-14 12:12:36 +02:00
mem_cache_store_test.rb Allow addresses to support nil values 2021-02-09 09:34:10 -05:00
memory_store_test.rb disable compression for MemoryStore's by default 2020-11-04 12:20:24 -05:00
null_store_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
redis_cache_store_test.rb disable compression for MemoryStore's by default 2020-11-04 12:20:24 -05:00