-
- Downloads
Cache Repository#root_ref within a request
When an empty project is loaded in the UI, there are 15 separate Gitaly FindDefaultBranch calls to determine the root_ref. Previously, it was not cached even within the request. This change caches it within the request so only a single FindDefaultBranch RPC is needed. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58684
Showing
- app/models/repository.rb 2 additions, 3 deletionsapp/models/repository.rb
- changelogs/unreleased/sh-cache-root-ref-asymetrically.yml 5 additions, 0 deletionschangelogs/unreleased/sh-cache-root-ref-asymetrically.yml
- spec/models/repository_spec.rb 33 additions, 27 deletionsspec/models/repository_spec.rb
Please register or sign in to comment