Is vfs-cache supposed to be a persistent cache?

What is the problem you are having with rclone?

Sorry If I do anything incorrectly, this is my first post on this forum! Is the vfs-cache supposed to be persistent between launches of the same remote? Currently no matter what I do the folder is emptied and recreated before the mount kicks in so everything has to recache. Or am I just using this incorrectly?

What is your rclone version (output from rclone version)

rclone v1.53.1

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10 64-bit

Which cloud storage system are you using? (eg Google Drive)

gdrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount "gdrive2:" X: --vfs-cache-mode full --cache-dir Z:\rclone -vvvvvv

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

Yes.

However the default cache time is quite short

  --vfs-cache-max-age duration             Max age of objects in the cache. (default 1h0m0s)

You can also set

  --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache. (default off)

to control the size.

The issue I'm having is if I close the remote and later remount it, the cache folder is cleaned out instead of the contents being used like a normal cache would

you would need to set this value to a high time duration.
by default, objects are removed from the cache in 1h0m0s

Add --vfs-cache-max-age 7d to your mount command to keep all items for 7 days. Adjust to suit.

Ok I understand now, my bad. I did not realize it was hitting the cache expiry since there were no messages that I saw in the log to that effect though I probably just missed them. Thanks for the help and thanks for the tool!

1 Like

No probs! Yes the default is quite short deliberately so it doesn't hog your disk space too much.

I have a 5TB scratch drive for projects so I don't care as much as the normal person about disk space probably lol

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.