add cacke

This commit is contained in:
李子铭 2025-03-20 17:45:12 +08:00
parent 413b816a10
commit e059a5f64a
1 changed files with 3 additions and 3 deletions

View File

@ -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 {