435c0d9fc8
This PR switches the Nomad repository from using govendor to Go modules for managing dependencies. Aspects of the Nomad workflow remain pretty much the same. The usual Makefile targets should continue to work as they always did. The API submodule simply defers to the parent Nomad version on the repository, keeping the semantics of API versioning that currently exists.
22 lines
948 B
Go
22 lines
948 B
Go
// Package lru provides three different LRU caches of varying sophistication.
|
|
//
|
|
// Cache is a simple LRU cache. It is based on the
|
|
// LRU implementation in groupcache:
|
|
// https://github.com/golang/groupcache/tree/master/lru
|
|
//
|
|
// TwoQueueCache tracks frequently used and recently used entries separately.
|
|
// This avoids a burst of accesses from taking out frequently used entries,
|
|
// at the cost of about 2x computational overhead and some extra bookkeeping.
|
|
//
|
|
// ARCCache is an adaptive replacement cache. It tracks recent evictions as
|
|
// well as recent usage in both the frequent and recent caches. Its
|
|
// computational overhead is comparable to TwoQueueCache, but the memory
|
|
// overhead is linear with the size of the cache.
|
|
//
|
|
// ARC has been patented by IBM, so do not use it if that is problematic for
|
|
// your program.
|
|
//
|
|
// All caches in this package take locks while operating, and are therefore
|
|
// thread-safe for consumers.
|
|
package lru
|