Documentation ¶
Index ¶
- type Cache
- type CacheStatistic
- type MemoryCache
- func (cache *MemoryCache) Get(cacheKey string, typeName string) (data any, loaded bool)
- func (cache *MemoryCache) Initialize(serializer serialization.BinarySerializer) *MemoryCache
- func (cache *MemoryCache) Remove(cacheKey string)
- func (cache *MemoryCache) Set(cacheKey string, data any, expiration time.Duration) error
- func (cache *MemoryCache) SetCacheName(name string)
- func (cache *MemoryCache) Stats() CacheStatistic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheStatistic ¶
func (CacheStatistic) HitRate ¶
func (stat CacheStatistic) HitRate() float64
type MemoryCache ¶
func (*MemoryCache) Get ¶
func (cache *MemoryCache) Get(cacheKey string, typeName string) (data any, loaded bool)
func (*MemoryCache) Initialize ¶
func (cache *MemoryCache) Initialize(serializer serialization.BinarySerializer) *MemoryCache
func (*MemoryCache) Remove ¶
func (cache *MemoryCache) Remove(cacheKey string)
func (*MemoryCache) SetCacheName ¶
func (cache *MemoryCache) SetCacheName(name string)
func (*MemoryCache) Stats ¶
func (cache *MemoryCache) Stats() CacheStatistic
Click to show internal directories.
Click to hide internal directories.