MCPcopy Create free account
hub / github.com/allegro/bigcache / TestCache_SetWithoutCleanWindow

Function TestCache_SetWithoutCleanWindow

bigcache_test.go:1262–1274  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1260}
1261
1262func TestCache_SetWithoutCleanWindow(t *testing.T) {
1263
1264 opt := DefaultConfig(time.Second)
1265 opt.CleanWindow = 0
1266 opt.HardMaxCacheSize = 1
1267 bc, _ := New(context.Background(), opt)
1268
1269 err := bc.Set("2225", make([]byte, 200))
1270 if nil != err {
1271 t.Error(err)
1272 t.FailNow()
1273 }
1274}
1275
1276func TestCache_RepeatedSetWithBiggerEntry(t *testing.T) {
1277

Callers

nothing calls this directly

Calls 4

DefaultConfigFunction · 0.85
NewFunction · 0.85
SetMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…