Exist 检查key是否存在
(ctx context.Context, number string)
| 77 | |
| 78 | // Exist 检查key是否存在 |
| 79 | func (s *smsCache) Exist(ctx context.Context, number string) bool { |
| 80 | key := getLockedKey(number) |
| 81 | return s.client.Exists(ctx, key).Err() == nil |
| 82 | } |
| 83 | |
| 84 | // Count 获取当天发送短信的次数 |
| 85 | func (s *smsCache) Count(ctx context.Context, number string) int { |
nothing calls this directly
no test coverage detected