Skip to content

Preload repository cache using MGET

Heinrich Lee Yu requested to merge 220329-reduce-redis-calls-projects-api into master

What does this MR do?

This allows us to preload multiple repository cache values using a single MGET command

This fixes a Redis N+1 issue in the projects API

Related to #220329 (closed)

How to setup and validate locally (strongly suggested)

  1. Add localhost:3000/api/v4/projects to the performance bar

Notice that the number of Redis calls will be reduced by a lot.

Note that there is another N+1 there for open_issues_count that's going to be fixed by !69479 (merged)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Heinrich Lee Yu

Merge request reports