gmcache

package
v0.0.0-...-e027c79 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GCache = newCache()

GCache global memory cache

Functions

This section is empty.

Types

type GetDataFunc

type GetDataFunc = func() (data interface{}, err error)

GetDataFunc 获取一个数据

type IBindCache

type IBindCache interface {
	MCache() *cache.Cache
	BindWithExp(bean interface{}, key string, exp time.Duration,
		getDataFunc GetDataFunc) (err error)
	RememberWithExpiration(key string, exp time.Duration,
		getFunc GetDataFunc) (data []byte, err error)
	ShortCache(key string, getFunc GetDataFunc) (data []byte, err error)
}

IBindCache 内存缓存bind接口

Jump to

Keyboard shortcuts

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