redis_cache

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisCache

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

func NewRedisCache

func NewRedisCache(url string) (*RedisCache, error)

func (*RedisCache) Close

func (r *RedisCache) Close() error

Close closes the redis client.

func (*RedisCache) Get

func (r *RedisCache) Get(ctx context.Context, key string, allowExpired bool) (v *dns.Msg, storedTime, expirationTime time.Time, err error)

func (*RedisCache) Store

func (r *RedisCache) Store(ctx context.Context, key string, v *dns.Msg, storedTime, expirationTime time.Time) (err error)

Jump to

Keyboard shortcuts

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