Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LocalCache = cache.New(cache.NoExpiration, 1*time.Minute)
LocalCache 基于github.com/patrickmn/go-cache的本地cache 默认key没有超时时间 默认的清理内存中超时key的时间间隔是1min
Functions ¶
This section is empty.
Types ¶
type LFUCache ¶
type LFUCache[K comparable, V any] struct { // contains filtered or unexported fields }
func NewLFUCache ¶
func NewLFUCache[K comparable, V any](capacity int) *LFUCache[K, V]
type LRUCache ¶
type LRUCache[K comparable, T any] struct { // contains filtered or unexported fields }
func NewLRUCache ¶
func NewLRUCache[K comparable, T any](capacity int) *LRUCache[K, T]
Click to show internal directories.
Click to hide internal directories.