Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for removeElement (0.58 sec)

  1. internal/lru/lru.go

    func (c *LRU[K, V]) removeOldest() {
    	if ent := c.evictList.Back(); ent != nil {
    		c.removeElement(ent)
    	}
    }
    
    // removeElement is used to remove a given list element from the cache. Has to be called with lock!
    func (c *LRU[K, V]) removeElement(e *Entry[K, V]) {
    	c.evictList.Remove(e)
    	delete(c.items, e.Key)
    	c.removeFromBucket(e)
    	if c.onEvict != nil {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Fri Apr 25 08:22:26 UTC 2025
    - 12.5K bytes
    - Viewed (0)
Back to top