Rails Cache Warning Rails 6.0.3.1, RUBY_VERSION: 2.7.1

Dear All,

I am facing the issue in Rails Cache

When the first time I execute this it execute well.

Rails.cache.fetch("a") do "message_members.read_status" end

And Now again executes the same it give warning:

Rails.cache.fetch("a") do "message_members.read_status" end

Warning

.rvm/gems/ruby-2.7.1@yellowseed/gems/activesupport-6.0.3.1/lib/active_support/cache.rb:330: warning: Passing the keyword argument as the last hash parameter is deprecated

.rvm/gems/ruby-2.7.1@yellowseed/gems/activesupport-6.0.3.1/lib/active_support/cache.rb:710: warning: The called method `get_entry_value’ is defined here

Followed Link: Caching with Rails: An Overview — Ruby on Rails Guides

You see this deprecation warning because in Ruby 3 positional and keyword arguments will be separated. This will be fixed in a future rails version. You can safely ignore that for now.

For more information read: Separation of positional and keyword arguments in Ruby 3.0.