From ae321cc9cf8d19f8a16b0fee8ced338fd0e52210 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Tue, 18 Sep 2018 10:50:19 -0700 Subject: [PATCH] cache: remove the unused old gc primitives Signed-off-by: Tonis Tiigi --- cache/gc.go | 27 --------------------------- cache/manager.go | 2 -- 2 files changed, 29 deletions(-) delete mode 100644 cache/gc.go diff --git a/cache/gc.go b/cache/gc.go deleted file mode 100644 index 31a98b93..00000000 --- a/cache/gc.go +++ /dev/null @@ -1,27 +0,0 @@ -package cache - -import ( - "context" - "errors" - "time" -) - -// GCPolicy defines policy for garbage collection -type GCPolicy struct { - MaxSize uint64 - MaxKeepDuration time.Duration -} - -// // CachePolicy defines policy for keeping a resource in cache -// type CachePolicy struct { -// Priority int -// LastUsed time.Time -// } -// -// func defaultCachePolicy() CachePolicy { -// return CachePolicy{Priority: 10, LastUsed: time.Now()} -// } - -func (cm *cacheManager) GC(ctx context.Context) error { - return errors.New("GC not implemented") -} diff --git a/cache/manager.go b/cache/manager.go index de73baf4..948eb8df 100644 --- a/cache/manager.go +++ b/cache/manager.go @@ -25,7 +25,6 @@ var ( type ManagerOpt struct { Snapshotter snapshot.SnapshotterBase - GCPolicy GCPolicy MetadataStore *metadata.Store PruneRefChecker ExternalRefCheckerFunc } @@ -40,7 +39,6 @@ type Accessor interface { type Controller interface { DiskUsage(ctx context.Context, info client.DiskUsageInfo) ([]*client.UsageInfo, error) Prune(ctx context.Context, ch chan client.UsageInfo, info ...client.PruneInfo) error - GC(ctx context.Context) error } type Manager interface {