mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-13 00:48:37 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c508eaf15
|
||
|
|
4d0c04cb26
|
@@ -86,7 +86,7 @@ func (c *BaseClient) Query(queryContent string, queryVariables interface{}, quer
|
||||
if !reflect.DeepEqual(queryHeadersModified, queryHeaders) {
|
||||
if cacheBaseClient.cache.enabled != c.cache.enabled && cacheBaseClient.cache.enabled {
|
||||
cacheBaseClient.Logger.Debug(cacheBaseClient, "Switching cache on as per single-request header")
|
||||
cacheBaseClient.enableCache()
|
||||
c.enableCache()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user