memory

package
v1.40.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-3.0 Imports: 4 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 wraps gocache.Cache in order to implement Cacher

func NewCache

func NewCache(cfg config.CacheConfig) *Cache

NewCache creates a new in memory cache with the provided cache config

func (*Cache) Delete

func (c *Cache) Delete(_ context.Context, key string) error

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, key string) ([]byte, bool, error)

func (*Cache) Set

func (c *Cache) Set(_ context.Context, key string, value []byte) error

func (*Cache) String

func (c *Cache) String() string

Jump to

Keyboard shortcuts

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