cache

package
v0.15.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResponseCacheConfig

func NewResponseCacheConfig(confContentYaml []byte) (*queryrange.ResultsCacheConfig, error)

Types

type InMemoryResponseCacheConfig

type InMemoryResponseCacheConfig struct {
	// MaxSize represents overall maximum number of bytes cache can contain.
	MaxSize string `yaml:"max_size"`
	// MaxSizeItems represents the maximum number of entries in the cache.
	MaxSizeItems int `yaml:"max_size_items"`
	// Validity represents the expiry duration for the cache.
	Validity time.Duration `yaml:"validity"`
}

type ResponseCacheConfig

type ResponseCacheConfig struct {
	Type   ResponseCacheProvider `yaml:"type"`
	Config interface{}           `yaml:"config"`
}

ResponseCacheConfig specifies the response cache config.

type ResponseCacheProvider

type ResponseCacheProvider string
const (
	INMEMORY ResponseCacheProvider = "IN-MEMORY"
)

TODO: add other cache providers when available.

Jump to

Keyboard shortcuts

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