inmemory

package
v0.0.0-...-041d6b2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCacheExpiration = 5 * time.Minute
	DefaultGCInterval      = 10 * time.Minute
)

Variables

This section is empty.

Functions

func NewCacheManager

func NewCacheManager() cache.CacheManager

Types

type Cache

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

func NewCache

func NewCache() *Cache

func (*Cache) Delete

func (imc *Cache) Delete(key string)

func (*Cache) Exists

func (imc *Cache) Exists(key string) bool

func (*Cache) Get

func (imc *Cache) Get(key string, value interface{}) error

func (*Cache) Keys

func (imc *Cache) Keys() []string

func (*Cache) Store

func (imc *Cache) Store(key string, value interface{}) error

func (*Cache) StoreWithTTL

func (imc *Cache) StoreWithTTL(key string, value interface{}, ttl time.Duration) error

type CacheManager

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

func (*CacheManager) Cache

func (cm *CacheManager) Cache(name string) cache.Cache

Jump to

Keyboard shortcuts

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