fix(repository): fixed accidental cache directory location change during refactoring (#1866)

This commit is contained in:
Jarek Kowalski
2022-03-27 12:46:40 -07:00
committed by GitHub
parent b64ad62f69
commit 4f36e4e1d0
2 changed files with 2 additions and 2 deletions

View File

@@ -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")
}

View File

@@ -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),