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)
|
item, err = r.getByPNO(ctx, item, PNO)
|
||||||
|
|
||||||
b, err := json.Marshal(item)
|
b, err := json.Marshal(item)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
r.rdb.Rdb.Set(ctx, c.Key, string(b), c.TTL)
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return r.rdb.Rdb.Set(ctx, c.Key, string(b), c.TTL).Err()
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue