mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-12 00:45:31 +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 != "" {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user