cloudpathlib icon indicating copy to clipboard operation
cloudpathlib copied to clipboard

Add a limit to the size of the local cache

Open pjbull opened this issue 5 years ago • 0 comments

Is there a package that will implement this for us?

We may need to create an LRU cache that we check the size of and remove files before downloading more. The tricky part about this being LRU cache is that we manipulate atime and mtime to match the cloud exactly. Perhaps we can abuse ctime to store the cached date so that we can sort by what has been downloaded most recently? Or maybe we stop overriding atime and trust that?

Also needs research: are there fast platform independent ways to estimate size of a directory?

pjbull avatar Aug 17 '20 17:08 pjbull