Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestLRUWithPurge (0.37 sec)

  1. tests/lru_test.go

    	}
    }
    
    // func TestExpirableMultipleClose(_ *testing.T) {
    //	lc :=lru.NewLRU[string, string](10, nil, 0)
    //	lc.Close()
    //	// should not panic
    //	lc.Close()
    // }
    
    func TestLRUWithPurge(t *testing.T) {
    	var evicted []string
    	lc := lru.NewLRU(10, func(key string, value string) { evicted = append(evicted, key, value) }, 150*time.Millisecond)
    
    	k, v, ok := lc.GetOldest()
    	if k != "" {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Sun May 25 07:40:40 UTC 2025
    - 10.4K bytes
    - Viewed (0)
Back to top