cache

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 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 CConfig

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

func NewCacheConfig

func NewCacheConfig(ctx context.Context, maxLimitConfigKey config.RootKey, ttlConfigKey config.RootKey, namespace string) *CConfig

func (*CConfig) Category

func (cc *CConfig) Category() (string, error)

func (*CConfig) MaxSize

func (cc *CConfig) MaxSize() (int64, error)

func (*CConfig) TTL

func (cc *CConfig) TTL() time.Duration

func (*CConfig) UniqueName

func (cc *CConfig) UniqueName() (string, error)

type CInterface

type CInterface cache.CInterface

func NewUmanagedCache

func NewUmanagedCache(ctx context.Context, sizeLimit int64, ttl time.Duration) CInterface

should only be used for testing purpose

type Manager

type Manager interface {
	GetCache(cc *CConfig) (CInterface, error)
	ResetCachesForNamespace(ns string)
	ListCacheNames(namespace string) []string
}

func NewCacheManager

func NewCacheManager(ctx context.Context) Manager

Jump to

Keyboard shortcuts

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