Skip to content

Commit cbcface

Browse files
committed
Document the defaults of cache_format_version
And add its new default to the new_framework_defaults_7_0 file.
1 parent d6895fb commit cbcface

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

guides/source/configuring.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ There are a few configuration options available in Active Support:
867867
868868
* `config.active_support.use_authenticated_message_encryption` specifies whether to use AES-256-GCM authenticated encryption as the default cipher for encrypting messages instead of AES-256-CBC.
869869
870-
* `config.active_support.cache_format_version` specifies which version of the cache serializer to use. Possible values are `6.1` and `7.0`. Defaults to `6.1`.
870+
* `config.active_support.cache_format_version` specifies which version of the cache serializer to use. Possible values are `6.1` and `7.0`.
871871
872872
* `ActiveSupport::Logger.silencer` is set to `false` to disable the ability to silence logging in a block. The default is `true`.
873873
@@ -1061,6 +1061,7 @@ text/javascript image/svg+xml application/postscript application/x-shockwave-fla
10611061
- `config.action_view.apply_stylesheet_media_default` : `false`
10621062
- `config.active_support.key_generator_hash_digest_class`: `OpenSSL::Digest::SHA256`
10631063
- `config.active_support.hash_digest_class`: `OpenSSL::Digest::SHA256`
1064+
- `config.active_support.cache_format_version`: `7.0`
10641065
- `config.action_dispatch.return_only_request_media_type_on_content_type`: `false`
10651066

10661067
#### For '6.1', defaults from previous versions below and:
@@ -1137,6 +1138,7 @@ text/javascript image/svg+xml application/postscript application/x-shockwave-fla
11371138
- `config.active_support.use_authenticated_message_encryption`: `false`
11381139
- `config.active_support.hash_digest_class`: `OpenSSL::Digest::MD5`
11391140
- `config.active_support.key_generator_hash_digest_class`: `OpenSSL::Digest::SHA1`
1141+
- `config.active_support.cache_format_version`: `6.1`
11401142
- `config.action_dispatch.return_only_request_media_type_on_content_type`: `true`
11411143
- `ActiveSupport.utc_to_local_returns_utc_offset_times`: `false`
11421144

railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@
2727
# various cache keys leading to cache invalidation.
2828
#
2929
# Rails.application.config.active_support.hash_digest_class = OpenSSL::Digest::SHA256
30+
31+
# Change the format of the cache entry.
32+
# Changing this default means that all new cache entries added to the cache
33+
# will have a different format that is not support by Rails 6.1 applications.
34+
# Only change this value after your application is fully deployed to Rails 7.0
35+
# and you have no plans to rollback.
36+
# config.active_support.cache_format_version = 7.0

0 commit comments

Comments
 (0)