Clarification of VFS cache eviction

Hello,

ownCloud (likely IS) recently waltzed into consideration for my home lab instance for a variety of reasons.

I have fairly high hopes that the VFS of the Windows desktop client could satisfy the requirements of a future project of mine, but I need clarification of how the caching mechanism works.

There’s not a lot of info I could find that detailed its implementation, but from the bits I’ve seen it sounds like in general how the cache works is that files are downloaded as needed until the cache is full, then the “oldest” files are evicted as needed in order to allow room for additional ones (with some special handling for favorites/files that are forced to be made available offline).

What I’d like to know is what exactly is meant by “oldest file”. What I’d prefer for my use case, and think is the most intuitive is for files that are oldest in terms of last access date to be removed, not the oldest file in terms of creation date (i.e. when it was first downloaded locally).

This way files that keep seeing use basically get reset to the front of the “eviction queue”. Otherwise, there could often be scenarios where files that were synched long ago, but are used regularly are needlessly removed from the cache only to be quickly re-download, and files that happened to be downloaded somewhat recently but thay only needed to be accessed once being needlessly kept around in their place.

I am also hoping that cached files are keep indefinitely unless removed manually or due to space constraints.

Ideally, the eviction policy and priority would be configureable by the user, but for whatver reason I’ve noticed a common theme while looking at similar solutions is that they tend not to be, so I’m not going to assume that.

Is this how the VFS cache works? Or is it different?

Thanks.

Automatic dehydration not implemented yet:
Windows - Automatic dehydration of not used files · Issue #7402 · owncloud/client · GitHub

Seems like quite a while for such a core feature to not be implemented, but obviously you’ve been busy dealing with the major shift to ocIS.

I’ve expressed my concerns on the issue.

1 Like