aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authory-yagi <yuuji.yaginuma@gmail.com>2019-07-26 10:24:52 +0900
committerGitHub <noreply@github.com>2019-07-26 10:24:52 +0900
commit65dcc9d1597b5472ed59ea6c73686d48942f76f6 (patch)
tree0fc48d3a247ca2c205034dcbbc0498a8c99f4968 /railties
parent0989956007b3b13de2e0b0496ab472d0b43516fb (diff)
parent13e43a10bdc81cbc50c28ba6415845c7e4650c17 (diff)
downloadrails-65dcc9d1597b5472ed59ea6c73686d48942f76f6.tar.gz
rails-65dcc9d1597b5472ed59ea6c73686d48942f76f6.tar.bz2
rails-65dcc9d1597b5472ed59ea6c73686d48942f76f6.zip
Merge pull request #36747 from y-yagi/add_mention_about_collection_cache_versioning
Add mention about `active_record.collection_cache_versioning` to the `new_framework_defaults.rb`
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt5
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt
index ffe53497bf..2510ab906f 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt
@@ -38,3 +38,8 @@
# MailDeliveryJob to ensure all delivery jobs are processed properly.
# Make sure your entire app is migrated and stable on 6.0 before using this setting.
# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
+
+# Enable the same cache key to be reused when the object being cached of type
+# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
+# of the relation's cache key into the cache version to support recycling cache key.
+# Rails.application.config.active_record.collection_cache_versioning = true