提交 c453f9cd 编写于 作者: K Kasper Timm Hansen

[ci skip] Remove final mentions of `static_cache_control` in docs.

It was deprecated in https://github.com/rails/rails/pull/19135.

We're now favoring `public_file_server.headers`.
上级 9cec43ca
......@@ -1029,7 +1029,9 @@ value is set to seconds with a maximum possible value of `31536000` which is one
year. You can do this in your rails application by setting
```
config.static_cache_control = "public, max-age=31536000"
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=31536000'
}
```
Now when your application serves an asset in production, the CDN will store the
......
......@@ -15,8 +15,10 @@ Rails.application.configure do
# Enable/disable caching. By default caching is disabled.
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.static_cache_control = "public, max-age=172800"
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=172800'
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册