Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRUExpireCache ¶
type LRUExpireCache struct {
// contains filtered or unexported fields
}
func NewLRUExpireCache ¶
func NewLRUExpireCache(maxSize int) *LRUExpireCache
NewLRUExpireCache return Lru cache
func NewLRUExpireCacheWithClock ¶
func NewLRUExpireCacheWithClock(maxSize int, clock Clock) *LRUExpireCache
NewLRUExpireCacheWithClock
func (*LRUExpireCache) Add ¶
func (c *LRUExpireCache) Add(key interface{}, value interface{}, ttl time.Duration)
add new element
func (*LRUExpireCache) Get ¶
func (c *LRUExpireCache) Get(key interface{}) (interface{}, bool)
get unexpired element from lru cache
Click to show internal directories.
Click to hide internal directories.