"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
docs: add section about --vfs-cache-max-age
NickIAm1b2f2c0d69c0
diff --git a/vfs/help.go b/vfs/help.goindex 84ad2dc9d..fe3c5f2a9 100644--- a/vfs/help.go+++ b/vfs/help.go@@ -86,7 +86,7 @@ find that you need one or the other or both.--cache-dir string Directory rclone will use for caching.--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)- --vfs-cache-max-age duration Max age of objects in the cache (default 1h0m0s)+ --vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)@@ -109,7 +109,18 @@ flags.If using !--vfs-cache-max-size! note that the cache may exceed this sizefor two reasons. Firstly because it is only checked every!--vfs-cache-poll-interval!. Secondly because open files cannot be-evicted from the cache.+evicted from the cache. When !--vfs-cache-max-size!+is exceeded, rclone will attempt to evict the least accessed files+from the cache first. rclone will start with files that haven't+been accessed for the longest. This cache flushing strategy is+efficient and more relevant files are likely to remain cached.++The !--vfs-cache-max-age! will evict files from the cache+after the set time since last access has passed. The default value of+1 hour will start evicting files from cache that haven't been accessed+for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0+and will wait for 1 more hour before evicting. Specify the time with+standard notation, s, m, h, d, w .You **should not** run two copies of rclone using the same VFS cachewith the same or overlapping remotes if using !--vfs-cache-mode > off!.diff --git a/vfs/vfsflags/vfsflags.go b/vfs/vfsflags/vfsflags.goindex ccdcb17db..b4682f785 100644--- a/vfs/vfsflags/vfsflags.go+++ b/vfs/vfsflags/vfsflags.go@@ -26,7 +26,7 @@ func AddFlags(flagSet *pflag.FlagSet) {flags.BoolVarP(flagSet, &Opt.ReadOnly, "read-only", "", Opt.ReadOnly, "Only allow read-only access")flags.FVarP(flagSet, &Opt.CacheMode, "vfs-cache-mode", "", "Cache mode off|minimal|writes|full")flags.DurationVarP(flagSet, &Opt.CachePollInterval, "vfs-cache-poll-interval", "", Opt.CachePollInterval, "Interval to poll the cache for stale objects")- flags.DurationVarP(flagSet, &Opt.CacheMaxAge, "vfs-cache-max-age", "", Opt.CacheMaxAge, "Max age of objects in the cache")+ flags.DurationVarP(flagSet, &Opt.CacheMaxAge, "vfs-cache-max-age", "", Opt.CacheMaxAge, "Max time since last access of objects in the cache")flags.FVarP(flagSet, &Opt.CacheMaxSize, "vfs-cache-max-size", "", "Max total size of objects in the cache")flags.FVarP(flagSet, &Opt.ChunkSize, "vfs-read-chunk-size", "", "Read the source objects in chunks")flags.FVarP(flagSet, &Opt.ChunkSizeLimit, "vfs-read-chunk-size-limit", "", "If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited)")