Skip to content

Commit

Permalink
fixup! fixup! Add randomisation test for cache concurrency.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszraczylo committed Apr 8, 2023
1 parent 833517f commit 841c136
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 841c136

Please sign in to comment.