trivial: move CachingOptions out of content.Manager, where it's not needed (#775)

* trivial: move CachingOptions out of content.Manager, where it's not needed

* trivial: removed newManagerWithOptions which was the same as NewManager

also moved one-time initialization to newReadManager()
This commit is contained in:
Jarek Kowalski
2021-01-07 18:51:15 -08:00
committed by GitHub
parent 8e17edcdf6
commit 73a34ff7ff
10 changed files with 30 additions and 34 deletions

View File

@@ -13,7 +13,7 @@
var cacheClearCommand = cacheCommands.Command("clear", "Clears the cache")
func runCacheClearCommand(ctx context.Context, rep *repo.DirectRepository) error {
if d := rep.Content.CachingOptions.CacheDirectory; d != "" {
if d := rep.Cache.CacheDirectory; d != "" {
log(ctx).Infof("Clearing cache directory: %v.", d)
// close repository before removing cache