def send_early_hints(env)
      return if Thread.current[CACHE_KEY].nil?

      Thread.current[CACHE_KEY].each_slice(BATCH_SIZE) do |slice|
        link = slice.map do |asset, options|
          ret = %(<#{asset}>; rel=preload)
          ret += "; as=#{options[:as]}" unless options[:as].nil?
          ret += "; crossorigin" if options[:crossorigin]
          ret
        end.join("\n")

        send_early_hints_response(env, link)
      end
    end
def send_early_hints(env)
      return if Thread.current[CACHE_KEY].nil?

      Thread.current[CACHE_KEY].each_slice(BATCH_SIZE) do |slice|
        link = slice.map do |asset, options|
          ret = %(<#{asset}>; rel=preload)
          ret += "; as=#{options[:as]}" unless options[:as].nil?
          ret += "; crossorigin" if options[:crossorigin]
          ret
        end.join("\n")

        send_early_hints_response(env, link)
      end
    end
Tries to send multiple Early Hints (103) HTTP responses, if there are
 assets eligible.

 @param env [Hash] Rack env

 @raise [Hanami::EarlyHints::NotSupportedByServerError] if the current Ruby
   server doesn't support Early Hints

 @since 1.2.0
 @api private