Skip to content

Use cached rendered readme when fetching project readme on home page

From https://gitlab.com/gitlab-org/gitlab-ce/issues/49409#note_89283811:

The project home page also uses the async blob viewer. I tested this using the tree and readme view (default), as well as the readme-only view. In both cases it made a request to https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md?format=json&viewer=rich, which does not go through ReadmeBlob at all, I think?

We started caching the rendered readme in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8838 (9.2).

Then it looks like we changed how those are fetched to be a more 'generic' path in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11191 (9.3), and so lost the ability to use the cached readme.

@DouweM @jramsay this would be a nice performance improvement for ~Create, as we already cache this (we just don't use the cached content). Alternatively, we could stop caching it.