deprecate cache backend (#5382)
This commit is contained in:
parent
654f5309b0
commit
062919e08c
6 changed files with 7 additions and 5 deletions
6
backend/cache/cache.go
vendored
6
backend/cache/cache.go
vendored
|
@ -339,8 +339,14 @@ func parseRootPath(path string) (string, error) {
|
|||
return strings.Trim(path, "/"), nil
|
||||
}
|
||||
|
||||
var warnDeprecated sync.Once
|
||||
|
||||
// NewFs constructs an Fs from the path, container:path
|
||||
func NewFs(ctx context.Context, name, rootPath string, m configmap.Mapper) (fs.Fs, error) {
|
||||
warnDeprecated.Do(func() {
|
||||
fs.Logf(nil, "WARNING: Cache backend is deprecated and may be removed in future. Please use VFS instead.")
|
||||
})
|
||||
|
||||
// Parse config into Options struct
|
||||
opt := new(Options)
|
||||
err := configstruct.Set(m, opt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue