handle error before populating cache

This commit is contained in:
Marcus Efraimsson 2018-11-05 09:58:13 +01:00
parent 6ef941ea17
commit 5be2332c66
No known key found for this signature in database
GPG Key ID: EBFE0FB04612DD4A

View File

@ -353,8 +353,12 @@ func (ss *SqlStore) GetSignedInUserWithCache(query *m.GetSignedInUserQuery) erro
}
err := GetSignedInUser(query)
if err != nil {
return err
}
ss.CacheService.Set(cacheKey, query.Result, time.Second*5)
return err
return nil
}
func GetSignedInUser(query *m.GetSignedInUserQuery) error {