feat: add store cache

This commit is contained in:
Steven
2023-06-21 08:46:52 +08:00
parent 01ed504735
commit 0ca88fac00
4 changed files with 35 additions and 8 deletions

View File

@ -181,7 +181,7 @@ func (s *Store) ListUsers(ctx context.Context, find *FindUser) ([]*User, error)
func (s *Store) GetUser(ctx context.Context, find *FindUser) (*User, error) {
if find.ID != nil {
if cache, ok := s.workspaceCache.Load(*find.ID); ok {
if cache, ok := s.userCache.Load(*find.ID); ok {
return cache.(*User), nil
}
}