mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Cache ctx.User in retrieveFeeds (#1902)
This commit is contained in:
		| @@ -67,6 +67,9 @@ func retrieveFeeds(ctx *context.Context, user *models.User, includePrivate, isPr | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	userCache := map[int64]*models.User{user.ID: user} | 	userCache := map[int64]*models.User{user.ID: user} | ||||||
|  | 	if ctx.User != nil { | ||||||
|  | 		userCache[ctx.User.ID] = ctx.User | ||||||
|  | 	} | ||||||
| 	repoCache := map[int64]*models.Repository{} | 	repoCache := map[int64]*models.Repository{} | ||||||
| 	for _, act := range actions { | 	for _, act := range actions { | ||||||
| 		// Cache results to reduce queries. | 		// Cache results to reduce queries. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user