[MM-21209] Add LRU cache for userstore.get (#13838)

* store/cache: add cache to user layer

* store/localcache: fix cache data access

* app/login: add invalidate for user

* store/user: move user sanitization to cache

* store/user: remove sanitize checks form the tests

* store/user: remove sanitization from store and cache layer

* store/cache: remove unnecessary error wraps

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2020-04-03 12:25:45 +03:00
коммит произвёл GitHub
родитель 1e89ef7314
Коммит f88e6f5fe0
5 изменённых файлов: 120 добавлений и 26 удалений

Просмотреть файл

@@ -825,10 +825,6 @@ func (us SqlUserStore) GetProfileByIds(userIds []string, options *store.UserGetB
return nil, model.NewAppError("SqlUserStore.GetProfileByIds", "store.sql_user.get_profiles.app_error", nil, err.Error(), http.StatusInternalServerError)
}
for _, u := range users {
u.Sanitize(map[string]bool{})
}
return users, nil
}