apq

package
v0.0.0-...-bd97fab Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

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 Struct

func NewCache

func NewCache(ttl time.Duration) (*Cache, error)

NewCache returns a new redis cache client

func (*Cache) Add

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

Add adds data to the cache

func (*Cache) Get

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

Get retrieves data from the cache

Jump to

Keyboard shortcuts

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