Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExpirableCache ¶
func NewExpirableCache[K comparable, V any](size int, onEvict expirable.EvictCallback[K, V], ttl time.Duration) *expirable.LRU[K, V]
NewExpirableCache 缓存(带TTL).
@param size (1) 缓存大小(max keys)
(2) 0: unlimited size
@param ttl Providing 0 TTL turns expiring off.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.