Fix cache invalidation for the diffs_batch.json endpoint

What does this MR do and why?

The diffs_batch.json endpoint could incorrectly use client cache when a conflict was introduced in the MR. User would have to wait the whole day before they could see the conflict. To solve that we set the client cache expiration timer to 1 hour, which should be fine for most cases.

References

Internal Slack report.

How to set up and validate locally

  1. Create a new merge request with some changes
  2. Visit the Changes tab
  3. Modify the same files in the target branch
  4. Visit the Changes tab again after 1 hour
  5. Observe the correct merge conflict message for in the diffs

Merge request reports

Loading