Fix cache problem on dashboard (#9358) (#9703)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Lauris BH 2020-01-11 16:23:40 +02:00 committed by GitHub
parent 0e5126da22
commit 45c8a3aeeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,9 @@ func retrieveFeeds(ctx *context.Context, options models.GetFeedsOptions) {
if act.ActUser != nil { if act.ActUser != nil {
userCache[act.ActUserID] = act.ActUser userCache[act.ActUserID] = act.ActUser
} }
}
for _, act := range actions {
repoOwner, ok := userCache[act.Repo.OwnerID] repoOwner, ok := userCache[act.Repo.OwnerID]
if !ok { if !ok {
repoOwner, err = models.GetUserByID(act.Repo.OwnerID) repoOwner, err = models.GetUserByID(act.Repo.OwnerID)