From 4f36e4e1d03c290e4137adeb1fed3a1dabc77988 Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Sun, 27 Mar 2022 12:46:40 -0700 Subject: [PATCH] fix(repository): fixed accidental cache directory location change during refactoring (#1866) --- internal/cache/content_cache.go | 3 +-- repo/content/committed_read_manager.go | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cache/content_cache.go b/internal/cache/content_cache.go index 61180c5ab..0f1d60d91 100644 --- a/internal/cache/content_cache.go +++ b/internal/cache/content_cache.go @@ -2,7 +2,6 @@ import ( "context" - "path/filepath" "github.com/pkg/errors" @@ -185,7 +184,7 @@ func NewContentCache(ctx context.Context, st blob.Storage, opt Options) (Content var err error - cacheStorage, err = NewStorageOrNil(ctx, filepath.Join(opt.BaseCacheDirectory, opt.CacheSubDir), opt.Sweep.MaxSizeBytes, opt.CacheSubDir) + cacheStorage, err = NewStorageOrNil(ctx, opt.BaseCacheDirectory, opt.Sweep.MaxSizeBytes, opt.CacheSubDir) if err != nil { return nil, errors.Wrap(err, "error initializing cache storage") } diff --git a/repo/content/committed_read_manager.go b/repo/content/committed_read_manager.go index 161829374..8f94a079b 100644 --- a/repo/content/committed_read_manager.go +++ b/repo/content/committed_read_manager.go @@ -394,6 +394,7 @@ func (sm *SharedManager) setupReadManagerCaches(ctx context.Context, caching *Ca BaseCacheDirectory: caching.CacheDirectory, CacheSubDir: "metadata", HMACSecret: caching.HMACSecret, + FetchFullBlobs: true, Sweep: cache.SweepSettings{ MaxSizeBytes: metadataCacheSize, MinSweepAge: caching.MinMetadataSweepAge.DurationOrDefault(DefaultMetadataCacheSweepAge),