From 91ce0d6c576d78e0f4a6c3d7d87169d714d252fa Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Thu, 5 Jul 2018 22:01:03 -0500 Subject: [PATCH] Unexport lru.Cache.RemoveOldest --- lru/lru.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }