import "golang.org/x/build/internal/lru"
Package lru implements an LRU cache.
type Cache struct {
// contains filtered or unexported fields
}
Cache is an LRU cache, safe for concurrent access.
New returns a new cache with the provided maximum items.
Add adds the provided key and value to the cache, evicting an old item if necessary.
Get fetches the key's value from the cache. The ok result will be true if the item was found.
Len returns the number of items in the cache.
RemoveOldest removes the oldest item in the cache and returns its key and value. If the cache is empty, the empty string and nil are returned.
Package lru imports 2 packages (graph) and is imported by 1 packages. Updated about 15 hours ago. Refresh now. Tools for package owners.