MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / newTestCache

Function newTestCache

cache/filesystem_cache_test.go:261–277  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

259}
260
261func newTestCache(t *testing.T) *fileSystemCache {
262 t.Helper()
263
264 cfg := config.Cache{
265 Name: "foobar",
266 FileSystem: config.FileSystemCacheConfig{
267 Dir: testDir,
268 MaxSize: 1e6,
269 },
270 Expire: config.Duration(time.Minute),
271 }
272 c, err := newFilesSystemCache(cfg, 1*time.Second)
273 if err != nil {
274 t.Fatal(err)
275 }
276 return c
277}

Callers 3

TestCacheCloseFunction · 0.85
TestFilesystemCacheMissFunction · 0.85

Calls 2

DurationTypeAlias · 0.92
newFilesSystemCacheFunction · 0.85

Tested by

no test coverage detected