Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigMemCache ¶
type BigMemCache struct {
// contains filtered or unexported fields
}
BigMemCache stores serialized items (feature as example) in memory. Item is serialized as []byte to avoid excessive GC stress and extra memory footprint.
func NewBigMemCache ¶
func NewBigMemCache(cfg *BigMemCacheCfg) (*BigMemCache, error)
NewBigMemCache 返回BigMemCache实例.
func (*BigMemCache) Get ¶
func (bmc *BigMemCache) Get(uuid string) *Feature
Get 从BigMemCache中获取特征对象.
type BigMemCacheCfg ¶
type BigMemCacheCfg struct {
MaxNumOfCacheItem uint64 // 最多可缓存的对象数量
MaxSizeOfCacheItem uint64 // 对象大小, unit is byte
}
BigMemCacheCfg BigMemCache配置
Click to show internal directories.
Click to hide internal directories.