# Vfs cache read without write

**URL:** <https://forum.rclone.org/t/vfs-cache-read-without-write/52409>\
**Category:** Feature\
**Created:** [September 1, 2025, 9:33am UTC](https://forum.rclone.org/t/vfs-cache-read-without-write/52409 "2025-09-01T09:33:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hritik](https://forum.rclone.org/letter_avatar_proxy/v4/letter/h/dbc845/32.png) [@hritik](https://forum.rclone.org/u/hritik)\
**Post date:** [September 1, 2025, 9:33am UTC](https://forum.rclone.org/t/vfs-cache-read-without-write/52409/1 "2025-09-01T09:33:03Z")

</div>

Current vfs cache offers, none, full and write options. Would it make sense to have a `read` option as well.

Use case: I’ve an application that reads very frequently from a remote and writes infrequently. The network connection could go down, here a `read` cache will speed up repeated reads but having `write` cache is a problem, since, if the remote goes down cache will never be sent.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [September 1, 2025, 11:16pm UTC](https://forum.rclone.org/t/vfs-cache-read-without-write/52409/2 "2025-09-01T23:16:53Z")

</div>

If you use --vfs-cache-mode full then the files will be uploaded when the network comes back.

Or if you want synchronous upload use --vfs-write-back 0

```
--vfs-write-back duration Time to writeback files after last use when

```

---

<div class="post-metadata">

**Author:** ![hritik](https://forum.rclone.org/letter_avatar_proxy/v4/letter/h/dbc845/32.png) [@hritik](https://forum.rclone.org/u/hritik)\
**Post date:** [September 2, 2025, 5:43am UTC](https://forum.rclone.org/t/vfs-cache-read-without-write/52409/3 "2025-09-02T05:43:02Z")

</div>

> files will be uploaded when the network comes back.

I was running this on a rasp pi and it suddenly crashed, it’s running an immich server that does 2 relevant tasks

1. Upload a file to uploads/file.jpg
2. Mark that uploads/file.jpg is successfully uploaded in a remote db

Heres `uploads` is a network mount with vfs cache full enabled.

I suspect the following happened:

1. Upload a file to uploads/file.jpg
2. File cached at uploads/file.jpg [not yet sent to network mount]
3. Mark that uploads/file.jpg is successfully uploaded
4. crash
5. recover (local fs wiped)
6. db inconsistent as file.jpg does not exist on network mount but db says that it is

It was never actually able to upload the said file because of write cache.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [September 2, 2025, 10:49pm UTC](https://forum.rclone.org/t/vfs-cache-read-without-write/52409/4 "2025-09-02T22:49:28Z")

</div>

> [@hritik](#):
>
> recover (local fs wiped)

If the vfs cache is wiped there isn't much rclone can do about that. If the vfs cache was intact, rclone would have uploaded the file on restart.

---

<div class="post-metadata">

**Author:** ![hritik](https://forum.rclone.org/letter_avatar_proxy/v4/letter/h/dbc845/32.png) [@hritik](https://forum.rclone.org/u/hritik)\
**Post date:** [September 3, 2025, 4:51am UTC](https://forum.rclone.org/t/vfs-cache-read-without-write/52409/5 "2025-09-03T04:51:16Z")

</div>

Would it make sense to have a vfs cache for reads only in that case ?

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [September 3, 2025, 11:13am UTC](https://forum.rclone.org/t/vfs-cache-read-without-write/52409/6 "2025-09-03T11:13:40Z")

</div>

I think having a vfs cache only for reads would be possible but I think it would give a bad user experience. It would have all the limitations of `--vfs-cache-mode off` but with all the downsides of having a local cache.

You could try the union writeback cache with `--vfs-cache-mode off` that might be more what you are looking for

> **[Union](https://rclone.org/union/#writeback)**
>
> Remote Unification

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [November 2, 2025, 11:13am UTC](https://forum.rclone.org/t/vfs-cache-read-without-write/52409/7 "2025-11-02T11:13:54Z")

</div>

Closed on November 2, 2025, 11:13am UTC

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