cache

package
v0.0.0-...-3e1c22f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2019 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisClient *redis.Client

RedisClient represents redis client.

Functions

func ConnectRedis

func ConnectRedis() *redis.Client

ConnectRedis connects redis.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache Automatic persisted queries

func NewAPQCache

func NewAPQCache(redisClient *redis.Client, ttl time.Duration) (*Cache, error)

NewAPQCache create new automatic persisted queries cache for caching graphql queries

func (*Cache) Add

func (c *Cache) Add(ctx context.Context, hash string, query string)

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, hash string) (string, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL