kubernetes/vendor/k8s.io/utils/lru/lru.go

type Key

type EvictionFunc

type Cache

// New creates an LRU of the given size.
func New(size int) *Cache {}

// NewWithEvictionFunc creates an LRU of the given size with the given eviction func.
func NewWithEvictionFunc(size int, f EvictionFunc) *Cache {}

// Add adds a value to the cache.
func (c *Cache) Add(key Key, value interface{}

// Get looks up a key's value from the cache.
func (c *Cache) Get(key Key) (value interface{}

// Remove removes the provided key from the cache.
func (c *Cache) Remove(key Key) {}

// RemoveOldest removes the oldest item from the cache.
func (c *Cache) RemoveOldest() {}

// Len returns the number of items in the cache.
func (c *Cache) Len() int {}

// Clear purges all stored items from the cache.
func (c *Cache) Clear() {}