diff --git a/internal/driver/config.go b/internal/driver/config.go index 98e4b79ba15..30d8ffb33f6 100644 --- a/internal/driver/config.go +++ b/internal/driver/config.go @@ -6,4 +6,5 @@ type Config struct { OnlyLocal bool OnlyProxy bool NoNeedSetLink bool + NoCache bool } diff --git a/internal/operations/fs.go b/internal/operations/fs.go index f8d34b1b351..15794af9d99 100644 --- a/internal/operations/fs.go +++ b/internal/operations/fs.go @@ -20,6 +20,9 @@ var filesG singleflight.Group[[]driver.FileInfo] // List files in storage, not contains virtual file func List(ctx context.Context, account driver.Driver, path string) ([]driver.FileInfo, error) { + if account.Config().NoCache { + return account.List(ctx, path) + } key := stdpath.Join(account.GetAccount().VirtualPath, path) if files, ok := filesCache.Get(key); ok { return files, nil