修复缓存相关问题

This commit is contained in:
zhangdeman committed 2024-06-14 22:48:32 +08:00
1 parent a21eb17f5f
commit c50cb0039a
1 file changed
+3 -1
+3 -1
View File
@@ -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
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.