-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache remote files locally from external storage #11839
Comments
Open a can of worms of "interesting" sync and conflict problems :-) |
Yes, this needs to be thought through first, but is interesting indeed. If external storage is more the focus in the future, we might want to look into that. |
(this enhancement proposal is brought to you by the productive 🍕 we just had from the usual italian place we used to go to) |
Maybe some remote storage have support for things similiar to ETags? - Then we would only need to make a single request instead of getting the whole file. |
We actually already have change detection based on mtime (and etag if it's an "ownCloud" mount). That change detection could be wired in with the proposed cache system to invalidate the entry. |
I have branch with the stat via filecache and cache files locally part working. Still need to implement a background job that frees up cache ... I started it to make the oc instance on my v server a huge cache for the oc instance at home to create a tiered storage. The current assumption is that I never upload files directly to the owncloud instance at home to avoid rescanning issues. I postponed work until files external is cleaned up: #11797, #11830, #11261 |
Somewhat related: using csync to sync with external storages: #5225 |
Would this allow to extend local storage space like macOS Sierrra does with iCloud? |
Sync conflicts are a problem, yes. The way I see it is that we need to create conflict files for these and have these visible somewhere. |
For the use case where specific files from external storage are accessed often, one idea is to download and cache that file locally in the ownCloud instance (for example in the "cache" folder). If the file isn't re-read for a given amount of time, it is deleted from the local OC cache folder.
The admin could specify how much cache is allocated per storage and/or user.
Whenever a cached file is modified it is first modified only in the cached version, and then "synced up" after a specific time. (note: conflicts might occur if files are modified outside OC, so not sure whether this is a good idea)
Then the question: how often would a single version of a file be accessed ? Whenever someone uses the sync client, that file is only downloaded once. But if the same file is downloaded by multiple, then there is an extra overhead of having to proxy it every time from the remote storage through OC back to the user.
When accessing files over the UI, the file would be opened/downloaded every time. In this case the local file caching would help as well.
This idea could, in general, improve remote file access speed.
What do you think ?
@icewind1991 @schiesbn @DeepDiver1975 @MTRichards @karlitschek @craigpg
The text was updated successfully, but these errors were encountered: