diff --git a/httpclient/client.go b/httpclient/client.go index a7cf4b5..64f9978 100644 --- a/httpclient/client.go +++ b/httpclient/client.go @@ -455,7 +455,7 @@ func (hc *HttpClient) newResponse() *define.Response { // // Date : 16:04 2024/6/3 func (hc *HttpClient) getCacheResult() *define.Response { - if nil == hc.reqOption.CacheInstance { + if nil == hc.reqOption || nil == hc.reqOption.CacheInstance { log.RecordDebug("接口请求前缓存检测, 未设置缓存实例", map[string]any{}, hc.reqCfg) return nil }