ichubcache

package
v1.0.1-rel-02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Cache_expire_time = 30 * time.Minute

Variables

View Source
var FileCache = NewFileCache()
View Source
var InstCache = NewCache()

Functions

func CacheGet

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

func CacheGetOf

func CacheGetOf[T any](gc *IchubCache, Key string) (*T, bool)

func CacheSet

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

func CacheSetOf

func CacheSetOf[T any](gc *IchubCache, Key string, object *T)

func Delete

func Delete(Key string)

func DeleteOf

func DeleteOf(gc *IchubCache, Key string)

func FindMetaCacheSet

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

func ForceCacheExpire

func ForceCacheExpire(Pkey string)

func InjectMetaCache

func InjectMetaCache(s *MetaCache)

func LoadMetaCache

func LoadMetaCache() baseiface.ISingleton

func StoreCacheExpire

func StoreCacheExpire(key string, v *IchubCache)

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 {
	Pkey        string
	ExpireTime  time.Duration
	ForceExpire bool
	// contains filtered or unexported fields
}

func Default

func Default() *IchubCache

func DefaultOf

func DefaultOf(Pkey string, expireTime time.Duration) *IchubCache

func LoadCacheExpire

func LoadCacheExpire(key string) *IchubCache

func NewCache

func NewCache() *IchubCache

func NewIchubCache

func NewIchubCache(Pkey string) *IchubCache

func (*IchubCache) Delete

func (this *IchubCache) Delete(k string)

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

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

func FindBeanMetaCache

func FindBeanMetaCache() *MetaCache

FindBeanMetaCache

func NewMetaCache

func NewMetaCache() *MetaCache

func (*MetaCache) CacheGet

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

func (*MetaCache) CacheGetType

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

func (*MetaCache) CacheSet

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

func (*MetaCache) CacheSetType

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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