<% team_scores_last_updated = @schools.map(&:updated_at).compact.max&.utc&.to_fs(:nsec) %>
<% cache ["team_scores", @tournament.id, @schools.size, team_scores_last_updated] do %>
  <table class="pagebreak table table-striped table-bordered">
  <h3>Team Scores</h3>
    <thead>
      <tr>
        <th>Name</th>
        <th>Score</th>
      </tr>
    </thead>
  
    <tbody>
      <% @schools.each_with_index do |school, index| %>
        <%= render "tournaments/team_score_row", school: school, rank: index + 1 %>
      <% end %>
    </tbody>
  </table>
<% end %>
