cache

package
v0.0.0-...-d879545 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.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 Cache

type Cache struct {
	Memory   *memory.Cache
	External *external.Cache
	// contains filtered or unexported fields
}

func NewCache

func NewCache(ctx context.Context, cfg *Config, storage external.Storage) *Cache

func (*Cache) Add

func (c *Cache) Add(key string, data cachedata.CacheData) error

func (*Cache) Delete

func (c *Cache) Delete(key string) error

func (*Cache) Select

func (c *Cache) Select(key string) (*rrdata.RequestResponseData, error)

nolint : cyclomatic

type Config

type Config struct {
	// Disabled is flag that cache disabled
	Disabled bool
	// Memory is a inmemory cache config
	Memory *memory.Config
	// External is a external cache config
	External *external.Config
}

func (*Config) Merge

func (c *Config) Merge(target *Config) *Config

func (*Config) SetDefault

func (c *Config) SetDefault()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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