Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Size Size // 缓存容量,最小512*1024 【必填】 Expire time.Duration // 失效时间 【必填】 DisableMetric bool // metric上报 false 开启 ture 关闭【选填,默认开启】 Name string // 本地缓存名称,用于日志标识&metric上报【选填】 }
func (Config) Build ¶
func (c Config) Build() (localCache *LocalCache)
Build 构建本地缓存实例 The entry size need less than 1/1024 of cache size
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.