mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-17 01:17:43 +00:00
fixup! fixup! Add randomisation test for cache concurrency.
This commit is contained in:
@@ -115,6 +115,10 @@ func (c *BaseClient) Query(queryContent string, queryVariables interface{}, quer
|
|||||||
|
|
||||||
if cacheBaseClient.cache.enabled && jsonData != nil && queryHash != "" {
|
if cacheBaseClient.cache.enabled && jsonData != nil && queryHash != "" {
|
||||||
c.cache.client.Set(queryHash, jsonData)
|
c.cache.client.Set(queryHash, jsonData)
|
||||||
|
} else if jsonData == nil {
|
||||||
|
cacheBaseClient.Logger.Warn(cacheBaseClient, "Response is empty")
|
||||||
|
} else if queryHash == "" {
|
||||||
|
cacheBaseClient.Logger.Warn(cacheBaseClient, "Query hash is empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
return cacheBaseClient.decodeResponse(jsonData), err
|
return cacheBaseClient.decodeResponse(jsonData), err
|
||||||
|
|||||||
Reference in New Issue
Block a user