MCPcopy
hub / github.com/kopia/kopia / newContentDataCache

Function newContentDataCache

internal/cache/content_cache_concurrency_test.go:24–32  ·  view source on GitHub ↗
(ctx context.Context, st blob.Storage, cacheStorage cache.Storage)

Source from the content-addressed store, hash-verified

22type newContentCacheFunc func(ctx context.Context, st blob.Storage, cacheStorage cache.Storage) (cache.ContentCache, error)
23
24func newContentDataCache(ctx context.Context, st blob.Storage, cacheStorage cache.Storage) (cache.ContentCache, error) {
25 return cache.NewContentCache(ctx, st, cache.Options{
26 Storage: cacheStorage,
27 HMACSecret: []byte{1, 2, 3, 4},
28 Sweep: cache.SweepSettings{
29 MaxSizeBytes: 100,
30 },
31 }, nil)
32}
33
34func newContentMetadataCache(ctx context.Context, st blob.Storage, cacheStorage cache.Storage) (cache.ContentCache, error) {
35 return cache.NewContentCache(ctx, st, cache.Options{

Callers

nothing calls this directly

Calls 1

NewContentCacheFunction · 0.92

Tested by

no test coverage detected