diff --git a/lrucache/cache_test.go b/lrucache/cache_test.go index d890855..731b732 100644 --- a/lrucache/cache_test.go +++ b/lrucache/cache_test.go @@ -161,7 +161,7 @@ func BenchmarkCache_Set(b *testing.B) { b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { - c.Set(i, i) + c.Set(i % tc.cap, i) } }) }