Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So I can build a site that stuffs your cache full of "immutable" content, and all your frequently used "cache for 10 years" stuff gets evicted?


You can already do that...

Generally browser caches are "last used first out". So if you start stuffing the cache with a bunch of stuff you can already push the oldest out. And if you fill the whole thing you'll remove everything else.

It was actually quite a problem on mobile browsers for a while. IIRC iOS had something like a 10MB cache for the longest time. A few heavy websites and your whole cache would cycle through. Android had a 5MB cache at one point as well! A shitty news site can already fill that single handedly.

But my idea here (which I gave about 5 minutes of thought...) Was that immutable content would be evicted before the "10 year" stuff. The idea being that if something replaced an immutable "thing" it could be evicted much sooner.

I'm not sure if it would really help at all, just kind of throwing out some ideas.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: