rschroll / rmfuse

FUSE access to the reMarkable Cloud
MIT License
95 stars 8 forks source link

Don't rely on rmcl for caching file contents #11

Closed rschroll closed 3 years ago

rschroll commented 3 years ago

Currently, rmcl caches file contents, which makes things easier for rmfuse. But rmcl doesn't know how long it should keep a cached file around for, so it only keeps one at a time. If you had two files open at once, they'd keep smashing the cache of the other, making access very slow.

It would be better if caching could be moved up to rmfuse. It could maintain a cached file for as long as a file handle is open. Or it could be even more clever.

This would allow rmcl to give up on trying to cache things, which leads to the odd behavior of handing out the same file handle multiple times. That's ugly and invites race conditions.

rschroll commented 3 years ago

Just closed in 7a07c31, but screwed up the commit message.