package lru
// Clear removes all entries from the cache.
func (cache *Cache[K, V]) Clear() {
for elem := cache.lru.Front(); elem != nil; {
next := elem.Next()
cache.removeElem(elem)
elem = next
}
}
![]() |
index : ~runxiyu/furgit.git | |
| Unnamed repository; edit this file 'description' to name the repository. |
| aboutsummaryrefslogtreecommitdiff |
package lru
// Clear removes all entries from the cache.
func (cache *Cache[K, V]) Clear() {
for elem := cache.lru.Front(); elem != nil; {
next := elem.Next()
cache.removeElem(elem)
elem = next
}
}