| 313 | } |
| 314 | |
| 315 | func (r *redisCache) clean(stringKey string) { |
| 316 | delCtx, cancelFunc := context.WithTimeout(context.Background(), removeTimeout) |
| 317 | defer cancelFunc() |
| 318 | delErr := r.client.Del(delCtx, stringKey).Err() |
| 319 | if delErr != nil { |
| 320 | log.Debugf("redis item was only partially inserted and chproxy couldn't remove the partial result because of %s", delErr) |
| 321 | } else { |
| 322 | log.Debugf("redis item was only partially inserted, chproxy was able to remove it") |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | func (r *redisCache) Name() string { |
| 327 | return r.name |