cachestore

package
v0.0.0-...-b8330c8 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 2 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 interface {
	Get(key string) (interface{}, bool)
	Set(key string, value interface{})
	SetWithTTL(key string, value interface{}, ttl time.Duration)
	Delete(key string)
	Flush()
}

func NewMemoryCache

func NewMemoryCache() Cache

func NewNoopCache

func NewNoopCache() Cache

type NoopCache

type NoopCache struct{}

func (NoopCache) Delete

func (n NoopCache) Delete(string)

func (NoopCache) Flush

func (n NoopCache) Flush()

func (NoopCache) Get

func (n NoopCache) Get(string) (interface{}, bool)

func (NoopCache) Set

func (n NoopCache) Set(string, interface{})

func (NoopCache) SetWithTTL

func (n NoopCache) SetWithTTL(string, interface{}, time.Duration)

Jump to

Keyboard shortcuts

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