mirror of https://github.com/rails/rails
Merge pull request #48662 from skipkayhil/hm-fix-memcache-6-1-deprecation
Fix MemCacheStore not warning on 6.1 cache format
This commit is contained in:
commit
1cbd88f918
|
@ -224,6 +224,12 @@ module ActiveSupport
|
|||
private
|
||||
def default_coder
|
||||
if Cache.format_version == 6.1
|
||||
ActiveSupport.deprecator.warn <<~EOM
|
||||
Support for `config.active_support.cache_format_version = 6.1` has been deprecated and will be removed in Rails 7.2.
|
||||
|
||||
Check the Rails upgrade guide at https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#new-activesupport-cache-serialization-format
|
||||
for more information on how to upgrade.
|
||||
EOM
|
||||
Cache::SerializerWithFallback[:passthrough]
|
||||
else
|
||||
super
|
||||
|
|
|
@ -106,7 +106,11 @@ module CacheStoreFormatVersionBehavior
|
|||
|
||||
private
|
||||
def with_format(format_version, &block)
|
||||
ActiveSupport.deprecator.silence do
|
||||
if format_version == 6.1
|
||||
assert_deprecated(ActiveSupport.deprecator) do
|
||||
ActiveSupport::Cache.with(format_version: format_version, &block)
|
||||
end
|
||||
else
|
||||
ActiveSupport::Cache.with(format_version: format_version, &block)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue