diff --git a/query.go b/query.go index aae8b37..fcd31aa 100644 --- a/query.go +++ b/query.go @@ -118,9 +118,9 @@ 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 { + } else if cacheBaseClient.cache.enabled && jsonData == nil { cacheBaseClient.Logger.Warn(cacheBaseClient, "Response is empty") - } else if queryHash == "" { + } else if cacheBaseClient.cache.enabled && queryHash == "" { cacheBaseClient.Logger.Warn(cacheBaseClient, "Query hash is empty") }