mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-03 20:21:40 +00:00
feat: add store cache
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user