mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update store cache
This commit is contained in:
@@ -131,9 +131,11 @@ func (s *Store) GetUser(ctx context.Context, find *FindUser) (*User, error) {
|
||||
if *find.ID == SystemBotID {
|
||||
return SystemBot, nil
|
||||
}
|
||||
|
||||
if cache, ok := s.userCache.Load(*find.ID); ok {
|
||||
return cache.(*User), nil
|
||||
user, ok := cache.(*User)
|
||||
if ok {
|
||||
return user, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user