apq

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package apq implement the graphql.Cache interface which is used for automatic persisted queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache is a shared store for APQ and query AST caching.

func NewCache

func NewCache(client redis.Client) *Cache

NewCache returns a new Cache instance for APQ.

func (*Cache) Add

func (c *Cache) Add(ctx context.Context, key string, value interface{})

Add adds a value to the cache.

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, key string) (interface{}, bool)

Get looks up a key's value from the cache.

Jump to

Keyboard shortcuts

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