I have a small application that uses ActiveSupport::Cache (via require 'active_support/cache'), and is not a full rails application. How do I set the cache.active_support_cache_format_version to solve for the pending deprecation?
I use it with:
@cache = ActiveSupport::Cache::FileStore.new("/tmp/[...]"))
@cache.fetch([...]) do
end
I don't have any other ActiveSupport modules in my application.
Everything I can find is referencing setting this in Rails config, which doesn't exist in my application. I expected I could set it on the cache object directly, but it doesn't appear to have any available methods to accomplish this.
I checked https://api.rubyonrails.org/classes/ActiveSupport/Cache.html as well as .methods, and even .private_methods in case there was something not public I could explore.
It's just an attribute accessor:
https://github.com/rails/rails/blob/v7.1.3.2/railties/lib/rails/application/bootstrap.rb#L77
https://github.com/rails/rails/blob/v7.1.3.2/activesupport/lib/active_support.rb#L109
https://github.com/rails/rails/blob/v7.1.3.2/activesupport/lib/active_support/cache.rb#L58