MCPcopy Index your code
hub / github.com/bluele/gcache / testSetCache

Function testSetCache

helpers_test.go:13–23  ·  view source on GitHub ↗
(t *testing.T, gc Cache, numbers int)

Source from the content-addressed store, hash-verified

11}
12
13func testSetCache(t *testing.T, gc Cache, numbers int) {
14 for i := 0; i < numbers; i++ {
15 key := fmt.Sprintf("Key-%d", i)
16 value, err := loader(key)
17 if err != nil {
18 t.Error(err)
19 return
20 }
21 gc.Set(key, value)
22 }
23}
24
25func testGetCache(t *testing.T, gc Cache, numbers int) {
26 for i := 0; i < numbers; i++ {

Callers 4

TestARCGetFunction · 0.85
TestLRUGetFunction · 0.85
TestSimpleGetFunction · 0.85
TestLFUGetFunction · 0.85

Calls 2

loaderFunction · 0.85
SetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…