Hello, I'm having an issue where uploaded files are immediately purged from the rclone cache. Watching ~/.cache/rclone, I see the file being written to the cache as it's uploaded, but it's immediately purged once the upload is complete.
With writes=true in the cache config, I was expecting the written file to hang around in the cache until it needs to be evicted to reclaim space. I even tried deleting the entire cache, but no difference (file.bin is only 1GB with a 50GB cache size in this case).
That link says it makes "it available from the cache store immediately once the upload is finished."
This is exactly the behavior I want, but not the behavior I'm seeing. How can it be available after the upload is finished if it's deleted after the upload is finished?
I understand what you're saying, and my confusion is around the docs explicitly stating the upload will be "available from the cache store". After an upload, you're saying it's available from the remote, not from the cache store. Right?
Regardless, it sounds like this isn't the flag I'm looking for. Is there any way to have rclone persist written files in the cache like it does with files that are opened for reading?
If I'm interpreting that log correctly, --cache-writes isn't purging your test file when the upload is completed, but rather thirty seconds later when the recent changes are polled from the google: remote.
Can you double check to see if the chunks are actually removed from the filesystem? You can set --cache-chunk-path and see if the chunks for your test file are still there. Perhaps this is just clearing out the metadata cache?
If rclone is actually clearing out the chunks, --poll-interval 0 might work around it for now (providing you aren't expecting legitimate changes from other locations).