Add caching to MergeRequestMergeabilityCheckWorker
In #336979 (closed) we identified a number of issues with the MergeRequestMergeabilityCheckWorker. Here was one of the findings:
The MergeRequestMergeabilityCheckWorker does not appear to cache consistent failures from the UserMergeToRef call.
- These calls can be very expensive, running for 30 seconds or more before failing.
- Each time a user visits the merge request page, rails will issue another MergeRequestMergeabilityCheckWorker job with the same outcome.
- Would it be possible to cache the fact that merge check is not succeeding and skip it if it is executed for the source and target SHAs?
We should investigate if we can cache the responses to this.
This one may be closely related to the work we have defined in &5598 (closed).