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
Alex Ghiculescu aedb2a7bae Require a for config.cache_store = :file_store
Currently if you do `config.cache_store = :file_store` in an initializer, your app will boot and the cache contents will be stored in a directory called `{}` in your project root. This is unlikely to be the intended outcome.

This PR raises an error if you call `config.cache_store = :file_store` without a path. The correct way to use the default cache path is `config.cache_store = :file_store, "#{config.root}/tmp/cache/"`.

To preserve the current behavior:

```ruby
config.cache_store = :file_store, "{}"
```

Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
2021-02-23 10:42:43 -06: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 Require a for config.cache_store = :file_store 2021-02-23 10:42:43 -06: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