From 81d01affc93c3293e1096828d3fc9cdfacc8bbc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 3 Jun 2024 18:47:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=AE=8C=E6=88=90=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.go b/client.go index 67335e9..120abb8 100644 --- a/client.go +++ b/client.go @@ -159,6 +159,9 @@ func (hc *HttpClient) Request() *define.Response { if response.RestyResponse, err = hc.request.Send(); nil != err { time.Sleep(time.Duration(hc.reqConfig.RetryRule.RetryTimeInterval) * time.Millisecond) } + + // 设置缓存 + response.IsCache, response.CacheError = hc.setCacheResult(response) } return nil