MCPcopy Index your code
hub / github.com/duke-git/lancet / ExampleLRUCache_Len

Function ExampleLRUCache_Len

algorithm/lrucache_example_test.go:67–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65}
66
67func ExampleLRUCache_Len() {
68 cache := NewLRUCache[int, int](2)
69
70 cache.Put(1, 1)
71 cache.Put(2, 2)
72
73 result := cache.Len()
74
75 fmt.Println(result)
76
77 // Output:
78 // 2
79}

Callers

nothing calls this directly

Calls 2

PutMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…