mirror of
https://github.com/restic/restic.git
synced 2026-08-20 04:23:28 +00:00
Simplify cache logic
This commit is contained in:
Vendored
+3
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user