5027: Cache loaded diffs when navigating between pages of diffs

arma_otter

What version are you running?

6.0.2

What's the URL of the page containing the problem?

/r/<review_request_id>/diff/<revision>/#index_header

What steps will reproduce the problem?

  1. Go to a review request diff viewer where the diff has been split across multiple pages.
  2. Go to the first page of diffs. The diffs will load sequentially.
  3. Go to the next/second page of diffs. The diffs will load sequentially.
  4. Go back to the first page of diffs. Although the diffs were loaded before in step 3, they are re-fetched and rendered again sequentially.

What is the expected output? What do you see instead?

For step (4), after loading a diff page and coming back to it, the diffs should be cached and shown in a one go instead of having to slowly refetch and rerender each diff sequentially.

What operating system are you using? What browser?

MacOS Sonoma 14.6.1 and Chrome versrion 129

Please provide any additional information below.