add cacke
This commit is contained in:
parent
413b816a10
commit
e059a5f64a
|
|
@ -68,11 +68,11 @@ func (r *ProductRepoImpl) GetByPNO(ctx context.Context, PNO string) (*bo.Product
|
|||
item, err = r.getByPNO(ctx, item, PNO)
|
||||
|
||||
b, err := json.Marshal(item)
|
||||
if err == nil {
|
||||
r.rdb.Rdb.Set(ctx, c.Key, string(b), c.TTL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return err
|
||||
return r.rdb.Rdb.Set(ctx, c.Key, string(b), c.TTL).Err()
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue