ichubcache

package
v1.4.132 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MulanPSL-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const Cache_expire_time = 30 * time.Minute

Variables

View Source
var FileCache = NewFileCache()

Functions

func CacheGet added in v1.4.102

func CacheGet[T any](Key string) (*T, bool)

func CacheSet added in v1.4.102

func CacheSet[T any](Key string, object *T)

func FindMetaCacheSet added in v1.4.102

func FindMetaCacheSet[T any](value baseiface.IcacheKey) *T

func InjectIchubCache added in v1.4.102

func InjectIchubCache(s *IchubCache)

func InjectMetaCache added in v1.4.102

func InjectMetaCache(s *MetaCache)

func LoadIchubCache added in v1.4.102

func LoadIchubCache() baseiface.ISingleton

func LoadMetaCache added in v1.4.102

func LoadMetaCache() baseiface.ISingleton

Types

type FuncFileCache

type FuncFileCache struct {
	Pkey       string
	ExpireTime time.Duration
	// contains filtered or unexported fields
}

func NewFileCache

func NewFileCache() *FuncFileCache

func NewFunFileCache

func NewFunFileCache(pkey string) *FuncFileCache

func (*FuncFileCache) Get

func (this *FuncFileCache) Get(k string) (interface{}, bool)

func (*FuncFileCache) Set

func (this *FuncFileCache) Set(k string, x interface{})

type IchubCache

type IchubCache struct {
	basedto.BaseEntitySingle

	Pkey       string
	ExpireTime time.Duration
	// contains filtered or unexported fields
}

func FindBeanIchubCache added in v1.4.102

func FindBeanIchubCache() *IchubCache

func NewCache

func NewCache() *IchubCache

func NewIchubCache

func NewIchubCache(Pkey string) *IchubCache

func (*IchubCache) Get

func (this *IchubCache) Get(k string) (interface{}, bool)

func (*IchubCache) Set

func (this *IchubCache) Set(k string, x interface{}, d time.Duration)

type MetaCache added in v1.4.102

type MetaCache struct {
	basedto.BaseEntitySingle
	// contains filtered or unexported fields
}

func FindBeanMetaCache added in v1.4.102

func FindBeanMetaCache() *MetaCache

FindBeanMetaCache

func NewMetaCache added in v1.4.102

func NewMetaCache() *MetaCache

func (*MetaCache) CacheGet added in v1.4.102

func (this *MetaCache) CacheGet(Key baseiface.IcacheKey) (any, bool)

func (*MetaCache) CacheGetType added in v1.4.102

func (this *MetaCache) CacheGetType(Key baseiface.IcacheKey, stype string) (any, bool)

func (*MetaCache) CacheSet added in v1.4.102

func (this *MetaCache) CacheSet(Key baseiface.IcacheKey)

func (*MetaCache) CacheSetType added in v1.4.102

func (this *MetaCache) CacheSetType(Key baseiface.IcacheKey, stype string)

Jump to

Keyboard shortcuts

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