cache

package
v0.0.0-...-5110490 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCastToVal = errors.New("cast to val err")
View Source
var ErrKeyHasExpired = errors.New("key has expired")
View Source
var ErrKeyNotExist = errors.New("key not exist")

Functions

func NewMemCache

func NewMemCache() *memCache

Types

type Cache

type Cache interface {
	StoreTemporary(key string, val interface{}, interval time.Duration) error

	Store(key string, val interface{}) error

	Load(key string) (interface{}, error)

	Delete(key string) error

	Exist(key string) (bool, error)
}

func GetMemMapCache

func GetMemMapCache() Cache

Jump to

Keyboard shortcuts

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