mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-18 01:27:25 +00:00
fixup! fixup! Finally - fixed the cache version for single query if its enabled via header.
This commit is contained in:
@@ -118,9 +118,9 @@ 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 {
|
} else if cacheBaseClient.cache.enabled && jsonData == nil {
|
||||||
cacheBaseClient.Logger.Warn(cacheBaseClient, "Response is empty")
|
cacheBaseClient.Logger.Warn(cacheBaseClient, "Response is empty")
|
||||||
} else if queryHash == "" {
|
} else if cacheBaseClient.cache.enabled && queryHash == "" {
|
||||||
cacheBaseClient.Logger.Warn(cacheBaseClient, "Query hash is empty")
|
cacheBaseClient.Logger.Warn(cacheBaseClient, "Query hash is empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user