Optimize preloading of markdown cache for commits
What does this MR do and why?
Problem
Markdown cache is generated for unnecessary commits during compare calls.
Solution
Preload markdown cache only for commits that will be visible to user.
References
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.