diff --git a/cache/cache.go b/cache/cache.go index 1ed4636b..574fb43c 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -84,10 +84,11 @@ func (r *RedisCache) Set(ctx context.Context, key string, value interface{}, exp if _, err = cl.Do("SET", key, value); err != nil { return } - if _, err = cl.Do("EXPIRE", key, int(expire.Seconds())); err != nil { - return + + if expire >= 0 { + _, err = cl.Do("EXPIRE", key, int(expire.Seconds())) } - return nil + return } // Exists method diff --git a/candiutils/http_request.go b/candiutils/http_request.go index d69b251a..45cab672 100644 --- a/candiutils/http_request.go +++ b/candiutils/http_request.go @@ -191,9 +191,6 @@ func (req *httpRequestImpl) DoRequest(ctx context.Context, method, url string, r trace.SetTag("http.method", httpReq.Method) trace.SetTag("http.url", httpReq.URL.String()) trace.SetTag("http.url_path", httpReq.URL.Path) - trace.SetTag("http.min_error_code", req.minHTTPErrorCodeThreshold) - trace.SetTag("http.retries", req.retries) - trace.SetTag("http.sleep_between_retry", req.sleepBetweenRetry.String()) trace.SetTag("http.timeout", req.timeout.String()) trace.SetTag("http.breaker_name", req.breakerName)