修复缓存相关问题
This commit is contained in:
parent
a21eb17f5f
commit
c50cb0039a
@ -376,9 +376,11 @@ func (hc *HttpClient) setCacheResult(response *define.Response) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
cacheKey := hc.cacheInstance.GetKey(hc.reqConfig)
|
||||
if err := hc.cacheInstance.SetValue(response.CacheInfo.CacheKey, serialize.JSON.MarshalForString(response)); nil != err {
|
||||
cacheValue := serialize.JSON.MarshalForString(response)
|
||||
if err := hc.cacheInstance.SetValue(cacheKey, cacheValue); nil != err {
|
||||
return false, err
|
||||
}
|
||||
response.CacheInfo.CacheKey = cacheKey
|
||||
response.CacheInfo.CacheValue = cacheValue
|
||||
return true, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user