(ctx context.Context, unit, actionType string)
| 78 | } |
| 79 | |
| 80 | func (cr *captchaRepo) DelActionType(ctx context.Context, unit, actionType string) (err error) { |
| 81 | now := time.Now() |
| 82 | cacheKey := fmt.Sprintf("ActionRecord:%s@%s@%s", unit, actionType, now.Format("2006-1-02")) |
| 83 | err = cr.data.Cache.Del(ctx, cacheKey) |
| 84 | if err != nil { |
| 85 | err = errors.InternalServer(reason.DatabaseError).WithError(err).WithStack() |
| 86 | } |
| 87 | return |
| 88 | } |
| 89 | |
| 90 | // SetCaptcha set captcha to cache |
| 91 | func (cr *captchaRepo) SetCaptcha(ctx context.Context, key, captcha string) (err error) { |