Cache remote - offline cache

What is the problem you are having with rclone?

I am wrapping rclone in an android application. Some users want to cache data locally for when there is no internet access.

However, when disconnecting, the cache remote fails completely.

Disclaimer: I understand that the cache-remote is deprecated.

Now to my actual questions:

Am i wrong in my understanding that the cache-remote should, in theory, allow offline access to cached files for the client? (If not, there is probably a bug.)
If not, is there a way to get an offline-cache for files?

From what i read in the documentation, the VFS-caching does not work in this way, it only keeps the data in memory. That would mean anytime rclone exits, all caches would be lost. Thanks for your time!


Failed to create file system for "tcache:/directory": failed to make remote "remoteRemote:/directory" to wrap: couldn't list files: Get "https://eapi.pcloud.com/listfolder?folderid=0": dial tcp: lookup eapi.pcloud.com on 127.0.0.53:53: server misbehaving

I also tested this with webdav, same error message, except the adresses are different.

Run the command 'rclone version' and share the full output of the command.

rclone lsd tcache:/directory

The rclone config contents with secrets removed.

[...]

[pcloud2]
type = pcloud
hostname = eapi.pcloud.com
token = 

[tcache]
type = cache
remote = pcloud2:/

rclone lsd tcache:/directory -vv

A log from the command with the -vv flag

// this is using the webdav remote. Its not really about the specific error anyway.
pacer: low level retry 10/10 (error Propfind "remoteserver": dial tcp: lookup fqdn on 127.0.0.53:53: server misbehaving)
2024/03/19 11:55:38 Failed to create file system for "tcache:/Files": failed to make remote "nextcloud:/Files" to wrap: read metadata failed: Propfind "remoteserver": dial tcp: lookup fqdn on 127.0.0.53:53: server misbehaving

Today offline caching mode is simply impossible.

Might be at some stage in the future when at least VFS directories cache is made persistent.

If you need some files for offline access you have to implement this logic in your app, store them locally and sync/bisync to cloud storage.

I don't think the cache backend was designed for offline use.

If you want something completely offline you can try a union of a local disk and the remote. You then use the :writeback option to bring files into the cache. Depending exactly on what you are doing this may be good enough.

If you are running using the VFS cache then all directory caches are currently lost on restart, yes.

The question about caching has popped up a few times, one with the cache remote and one to implement vfs caching. But i think both issue-poster misunderstood how those features worked in the first place (as did i, in the case for the cache backend).

Now i can explain it properly! Thanks for your responses.

1 Like

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