The source project of this merge request has been removed.
Use cached readme blobs where appropriate
What does this MR do?
GitLab keeps a cache of the rendered HTML for a repository's README as stored in the HEAD
branch. However, it was not used in all circumstances. In particular, the new blob viewer framework bypassed this cache entirely.
This MR ensures a ::ReadmeBlob
is returned instead of a ::Blob
when asking a repository for an individual blob, if the commit and path match the readme for HEAD
. This makes the cached HTML available to consumers, including the blob viewer.
The ReadmeBlob
is a simple delegator to the Blob
, so should be compatible in all cases. Adding the rendered_markdown
method is the only additional behaviour it contains.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Closes #49591 (closed)