package
Version:
v0.0.0-...-09b619f
Opens a new window with list of versions in this module.
Published: Aug 10, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Cache struct {
OnEvicted func(key string, value Value)
}
Cache is LRU cache. It is not safe for concurrent access.
Add adds a value to the cache.
Get look ups a key's value
func (c *Cache) RemoveOldest()
RemoveOldest removes the oldest item
type Value interface {
Len() int
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.