Documentation ¶
Overview ¶
Package lru provides one implementation of the LRU cache
Index ¶
- type Cache
- func (c *Cache) Capacity() uint64
- func (c *Cache) Clear()
- func (c *Cache) Delete(key cache.Key)
- func (c *Cache) ElementsCount() uint64
- func (c *Cache) Evict(n int)
- func (c *Cache) Full() bool
- func (c *Cache) Get(key cache.Key) (cache.Data, bool)
- func (c *Cache) Set(key cache.Key, data cache.Data)
- func (c *Cache) SetCapacity(capacity uint64)
- func (c *Cache) Size() uint64
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) ElementsCount ¶
func (*Cache) SetCapacity ¶
Click to show internal directories.
Click to hide internal directories.