mirror of
https://github.com/restic/restic.git
synced 2025-08-12 15:07:53 +00:00
Automatically exclude current restic cache
This commit is contained in:
5
internal/cache/cache.go
vendored
5
internal/cache/cache.go
vendored
@@ -152,3 +152,8 @@ func (c *Cache) Wrap(be restic.Backend) restic.Backend {
|
||||
Cache: c,
|
||||
}
|
||||
}
|
||||
|
||||
// BaseDir returns the base directory.
|
||||
func (c *Cache) BaseDir() string {
|
||||
return c.Base
|
||||
}
|
||||
|
@@ -4,6 +4,9 @@ import "io"
|
||||
|
||||
// Cache manages a local cache.
|
||||
type Cache interface {
|
||||
// BaseDir returns the base directory of the cache.
|
||||
BaseDir() string
|
||||
|
||||
// Wrap returns a backend with a cache.
|
||||
Wrap(Backend) Backend
|
||||
|
||||
|
Reference in New Issue
Block a user