mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 19:07:50 +00:00
Unexport lru.Cache.RemoveOldest
This commit is contained in:
parent
ffae51549b
commit
91ce0d6c57
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue