diff --git a/pkg/caches/lru.go b/pkg/caches/lru.go index 2444ffa..0606049 100644 --- a/pkg/caches/lru.go +++ b/pkg/caches/lru.go @@ -5,12 +5,14 @@ import ( ) /* -Use a least recently used caching strategy: +LRUMap is a cache map which uses +a least recently used caching strategy: Store last access in map, retrieve least recently used key. */ type LRUMap map[string]time.Time +// LRU retrievs the least recently used key func (lrumap LRUMap) LRU() string { t := time.Now() key := ""