method
retrieve_pool_options
v7.2.3 -
Show latest stable
- Class:
ActiveSupport::Cache::Store
retrieve_pool_options(options)private
No documentation available.
# File activesupport/lib/active_support/cache.rb, line 201
def retrieve_pool_options(options)
if options.key?(:pool)
pool_options = options.delete(:pool)
else
pool_options = true
end
case pool_options
when false, nil
return false
when true
pool_options = DEFAULT_POOL_OPTIONS
when Hash
pool_options[:size] = Integer(pool_options[:size]) if pool_options.key?(:size)
pool_options[:timeout] = Float(pool_options[:timeout]) if pool_options.key?(:timeout)
pool_options = DEFAULT_POOL_OPTIONS.merge(pool_options)
else
raise TypeError, "Invalid :pool argument, expected Hash, got: #{pool_options.inspect}"
end
pool_options unless pool_options.empty?
end