What is cache backend? What is the mechanism of rclone cache?

Hi. I use a g-suite account and created an team folder inside. This team folder is connected to an other personal gmail account to have more security (token, account info and keys writed on config file).

I have created a drive:/cache/crypt folder. I can upload file to the crypt folder and the video stream of Plex work very well for every file (4k included, buffer 6-7s).

I read a lot of ticket but I can't understand how cache works. When I play a file on the plex machine, i see local disk write a cache backend folder. The files are very large and it fill the local disk. Without free space Plex stream stop working. I don't understand what is the mechanism of rclone cache.

If i created a folder for the cache on the cloud why files are writed on the local disk?
Why people move this backend cache folder manually to the crypt cloud folder?

I'm bit confused because I can't understand the mechanism

The cache backend keeps chunks local as that's the purpose of it.

When you play a file, it stores chunks locally depending on your configuration.


If you can share your mount command and your rclone.conf (minus keys and passwords), we can see what your config is and how much is kept locally.

That being said, it's all on how your configuration is.

type = cache
remote = gdrive:/gcache
chunk_size = 10M
info_age = 1d
chunk_total_size = 50G
db_path = E:\Plex\rclonecache\ (moved backend cache here)
plex_url = plexurl:32400
plex_username = ****
plex_password = ****

type = crypt
remote = gcache:\crypt
filename_encryption = standard
directory_name_encryption = true
password = ****
password2 = ****

type = drive
client_id = ****
client_secret = ****
scope = drive
token = *****
team_drive = ****


rclone mount gcrypt: S: --tpslimit 10

info speed from Isp
70Mbit Download
20Mbit Upload

So you'd keep 50GB in your local cache based on your config.

yes, I choose 50G because I can whatch the video 4k the time necessary. But after that, the cache backend is filled, I must to manul empty the folder and i don't understand if is a correct choice

Check out the information in the docs:


It explains how it works as you shouldn't manually delete anything as that leads to chunk errors.

first was 10G the chunk size, but after some minutes it filled the backend folder, and the stream of Plex gone down. Rclone didn't eliminated old chunk files so in the rclone windows appears messages with problem of reading chunks and retry 1/10 2/10 etc.

I must use the --cache-chunk-clean-interval ?

What are the consequences of an empty backend cache? More api questions?

Once the max size hits, it cleans out old chunks based on the clean interval, which by default is every minute:


You get chunk retries, because you clean out the folder manually and it doesn't know it's gone as you manually deleted, making things retry and until it gets the new chunk.

If want to reproduce the issue, run the mount with -vv and share the log file.

ok, i did the mount -vv to look better what happen. I see that the first time you add a library to Plex it download some chunks on the backend cache folder. I set:

chunk-size 5M
chunk_total_size = 30M

I seen no difference. Video play well and thank's --cache-db-purge the first time now it delete itself after 1minute the cache files.

My question is: why so use a large cache folder ? Why people upload the cache?

That's completely up to you and configure it as to what best suits your setup as there is no one answer to that question.

Not sure what this means as this part is only for downloading and not for uploading.

1 ok so I will look how to configure it

2 I seen people upload to gdrive the cache backend folder created locally. I can't understand why

I think you mean offline uploading as you can copy a file and it copies locally first and uploads after a period of time.


I would assume people to do that to make it available immediately after the local copy rather than waiting for it to upload.

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