mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-12 00:45:31 +00:00
15 lines
350 B
Go
15 lines
350 B
Go
package gql
|
|
|
|
func (c *BaseClient) cacheLookup(hash string) []byte {
|
|
if c.cache.client != nil {
|
|
g, err := c.cache.client.Get(hash)
|
|
if err == nil {
|
|
c.Logger.Debug(c, "Cache hit;", "hash", hash)
|
|
return g
|
|
}
|
|
// if error is not nil it means that hash is not present in cache
|
|
c.Logger.Debug(c, "Cache miss;", "hash", hash)
|
|
}
|
|
return nil
|
|
}
|