Simplify cache logic

This commit is contained in:
Alexander Weiss
2021-09-03 21:01:00 +02:00
parent ec2e3b260e
commit 81876d5c1b
10 changed files with 64 additions and 100 deletions
+3 -8
View File
@@ -17,10 +17,9 @@ import (
// Cache manages a local cache.
type Cache struct {
path string
Base string
Created bool
PerformReadahead func(restic.Handle) bool
path string
Base string
Created bool
}
const dirMode = 0700
@@ -152,10 +151,6 @@ func New(id string, basedir string) (c *Cache, err error) {
path: cachedir,
Base: basedir,
Created: created,
PerformReadahead: func(restic.Handle) bool {
// do not perform readahead by default
return false
},
}
return c, nil