Documentation
¶
Index ¶
- Constants
- Variables
- func CacheGet[T any](Key string) (*T, bool)
- func CacheGetOf[T any](gc *IchubCache, Key string) (*T, bool)
- func CacheSet[T any](Key string, object *T)
- func CacheSetOf[T any](gc *IchubCache, Key string, object *T)
- func Delete(Key string)
- func DeleteOf(gc *IchubCache, Key string)
- func FindMetaCacheSet[T any](value baseiface.IcacheKey) *T
- func ForceCacheExpire(Pkey string)
- func InjectMetaCache(s *MetaCache)
- func LoadMetaCache() baseiface.ISingleton
- func StoreCacheExpire(key string, v *IchubCache)
- type FuncFileCache
- type IchubCache
- type MetaCache
Constants ¶
View Source
const Cache_expire_time = 30 * time.Minute
Variables ¶
View Source
var FileCache = NewFileCache()
View Source
var InstCache = NewCache()
Functions ¶
func CacheGetOf ¶
func CacheGetOf[T any](gc *IchubCache, Key string) (*T, bool)
func CacheSetOf ¶
func CacheSetOf[T any](gc *IchubCache, Key string, object *T)
func DeleteOf ¶
func DeleteOf(gc *IchubCache, Key string)
func FindMetaCacheSet ¶
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 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)
type MetaCache ¶
type MetaCache struct { basedto.BaseEntitySingle // contains filtered or unexported fields }
func NewMetaCache ¶
func NewMetaCache() *MetaCache
func (*MetaCache) CacheGetType ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.