MM-57084: Use cache for GetAllProfiles (#26391)
UserStore.GetAllProfiles is a very frequent call. We cache it when there are no options passed which is the default case. https://mattermost.atlassian.net/browse/MM-57084 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4fda7e6f34
Коммит
bca5ab9a1f
@@ -157,6 +157,7 @@ func getMockStore(t *testing.T) *mocks.Store {
|
||||
}
|
||||
mockUserStore.On("GetAllProfilesInChannel", mock.Anything, "123", true).Return(fakeProfilesInChannelMap, nil)
|
||||
mockUserStore.On("GetAllProfilesInChannel", mock.Anything, "123", false).Return(fakeProfilesInChannelMap, nil)
|
||||
mockUserStore.On("GetAllProfiles", mock.AnythingOfType("*model.UserGetOptions")).Return(fakeUser, nil)
|
||||
|
||||
mockUserStore.On("Get", mock.Anything, "123").Return(fakeUser[0], nil)
|
||||
users := []*model.User{
|
||||
|
||||
Ссылка в новой задаче
Block a user