Commit 5be2332c by Marcus Efraimsson

handle error before populating cache

parent 6ef941ea
......@@ -353,8 +353,12 @@ func (ss *SqlStore) GetSignedInUserWithCache(query *m.GetSignedInUserQuery) erro
}
err := GetSignedInUser(query)
ss.CacheService.Set(cacheKey, query.Result, time.Second*5)
if err != nil {
return err
}
ss.CacheService.Set(cacheKey, query.Result, time.Second*5)
return nil
}
func GetSignedInUser(query *m.GetSignedInUserQuery) error {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment