Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization for user.GetRepositoryAccesses to reduce db query times #495

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix missing cache
  • Loading branch information
lunny committed Dec 28, 2016
commit 6f9d90df43960ce72d098edda8de625abfda4de0
1 change: 1 addition & 0 deletions models/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func (user *User) GetRepositoryAccesses() (map[*Repository]AccessMode, error) {
if err = repo.GetOwner(); err != nil {
return nil, err
}
ownerCache[repo.OwnerID] = repo.Owner
}

repos[&repo.Repository] = repo.Access.Mode
Expand Down