diff --git a/lru/lru.go b/lru/lru.go index bd70df780..9e944703f 100644 --- a/lru/lru.go +++ b/lru/lru.go @@ -66,7 +66,7 @@ func (c *Cache) Add(key Key, value interface{}) { ele := c.ll.PushFront(&entry{key, value}) c.cache[key] = ele if c.MaxEntries != 0 && c.ll.Len() > c.MaxEntries { - c.RemoveOldest() + c.removeOldest() } } @@ -92,8 +92,8 @@ func (c *Cache) remove(key Key) { } } -// RemoveOldest removes the oldest item from the cache. -func (c *Cache) RemoveOldest() { +// removeOldest removes the oldest item from the cache. +func (c *Cache) removeOldest() { if c.cache == nil { return }