lespas icon indicating copy to clipboard operation
lespas copied to clipboard

Increase cache size options

Open IAmTheWebb opened this issue 1 year ago • 4 comments

I have a fairly large image collection 40,000+ and around 200gb in size, I think when I open the app it starts working its way through my collection caching all the old images through to the newest but due to the size when I scroll back the old images will have dropped from the cache.

Describe the solution you'd like I'm not exactly sure if assigning extra cache is feasible but I'd happily dedicate more space to it if it was. Ideally I'd like to have all the thumbails cached.

IAmTheWebb avatar Mar 21 '23 11:03 IAmTheWebb

Ok. let's add a no-limit option

scubajeff avatar Mar 21 '23 12:03 scubajeff

2nd thought, the cache is actually controlled by the upstream okhttp library, and heavily depends on your web server's cache controll setting too. it means larger cache size won't help.

scubajeff avatar Mar 22 '23 04:03 scubajeff

Ahh ok, so that sounds like it might be something unrelated. I had another look and I spotted that under Settings - Storage - Statistics it was maxing at around 826mb used in internal storage. I tried compiling a version of the app replacing all the 800s that were on a line mentioning cache with a considerably higher number and now I can turn on airplane mode to scroll through the history of the albums I've opened and they all seem to be persisting. Apologies if I'm going down completely the wrong avenue.

IAmTheWebb avatar Mar 22 '23 20:03 IAmTheWebb

No sure if that's because okhttp is smart enough to load cache when there is no network available. okhttp is just like a web browser, it will follow web server's cache rule

scubajeff avatar Mar 22 '23 23:03 scubajeff