class ActiveSupport::Cache::Store
def retrieve_pool_options(options)
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