From c30344eb6e102ef916eef7857d51a8bf6423bd62 Mon Sep 17 00:00:00 2001 From: st0012 Date: Wed, 24 Apr 2019 01:28:45 +0800 Subject: Update document about perform_caching's default value Clarify that both `config.action_controller.perform_caching` and `config.action_mailer.perform_caching`'s default are `true`. This default is set in `AbstractController::Caching`. One can verify this by commenting out all ``` @controller.perform_caching = true ``` in `actionpack/test/controller/caching_test.rb` and run the tests. They should still pass. --- guides/source/configuring.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides') diff --git a/guides/source/configuring.md b/guides/source/configuring.md index e1c9fad232..ca08821aa7 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -409,7 +409,7 @@ The schema dumper adds two additional configuration options: * `config.action_controller.asset_host` sets the host for the assets. Useful when CDNs are used for hosting assets rather than the application server itself. -* `config.action_controller.perform_caching` configures whether the application should perform the caching features provided by the Action Controller component or not. Set to `false` in development mode, `true` in production. +* `config.action_controller.perform_caching` configures whether the application should perform the caching features provided by the Action Controller component or not. Set to `false` in development mode, `true` in production. If it's not specified, the default will be `true`. * `config.action_controller.default_static_extension` configures the extension used for cached pages. Defaults to `.html`. @@ -696,7 +696,7 @@ There are a number of settings available on `config.action_mailer`: * `config.action_mailer.deliver_later_queue_name` specifies the queue name for mailers. By default this is `mailers`. -* `config.action_mailer.perform_caching` specifies whether the mailer templates should perform fragment caching or not. By default this is `false` in all environments. +* `config.action_mailer.perform_caching` specifies whether the mailer templates should perform fragment caching or not. If it's not specified, the default will be `true`. * `config.action_mailer.delivery_job` specifies delivery job for mail. Defaults to `ActionMailer::DeliveryJob`. -- cgit v1.2.3