Easy for the browser to lookup and fetch, not necessarily the process of writing permanently to the disk.
Comment on Why it redownloads files that are rendered in my app\browser?
gazby@lemmy.dbzer0.com 1 week agoIf it were difficult or time consuming to lookup or fetch items from the cache, it’s not a very effective cache 😬
spankmonkey@lemmy.world 1 week ago
gazby@lemmy.dbzer0.com 1 week ago
Virtually everything that’s ever written permanently to disk first exists in memory though.
spankmonkey@lemmy.world 1 week ago
If the system isn’t built to move it from memory to the disk then it isn’t easy to just move it over. The browser might have the file stored in a way that makes it easy to stop and fastforward or even allow it to play or partially load,. Trying to save a file that might be incomplete is far more complicated than a good old reliable direct download.
Think of it like orange juice. The browser may have stored it in a wide shallow bowl because that works better for the browser, but it would be a pain in the ass to pour into a small cup. Much easier to just pour a new cup of orange juice when it is in an expected format.
zoostation@lemmy.world 1 week ago
It’s more about keeping the downloads code independent from the cache code. Once one depends on the other, you can’t change either one without considering the other. Minimizing dependencies is the kind of complexity it’s good to avoid.