There are two hard problems in IT: cache invalidation, naming things and off-by-one errors.
And the oxford comma as well, apparently
GitHub is aggressively caching raw.github, breaking many use cases
111–120 of 145 posts
Re: GitHub is aggressively caching raw.github, breaking many use cases
#112Earlier quoted context omitted.
GitHub is among many tech companies currently shedding fat from hiring during the pandemic boom. The morality of that is another discussion, but I'd hardly call this a death rattle.
Let's see you apply that same logic in this thread: https://news.ycombinator.com/item?id=34715890
Re: GitHub is aggressively caching raw.github, breaking many use cases
#113Re: GitHub is aggressively caching raw.github, breaking many use cases
#114Earlier quoted context omitted.
Content addressing causes the name to change only when the content changes, which also means the name doesn't change if the content doesn't change, this by definition you don't have spurious cache invalidations
And how do you check what the new name of the content you haven't seen is?
Someone could get the cached of it, of course. But since it content addresses what it links to, it should avoid incoherent groups of cached data.
Re: GitHub is aggressively caching raw.github, breaking many use cases
#115Re: GitHub is aggressively caching raw.github, breaking many use cases
#116Re: GitHub is aggressively caching raw.github, breaking many use cases
#117Earlier quoted context omitted.
Github raw seems like the simplest system for solving cache invalidation: invalidate the cache of a changed file when it’s pushed. They have access to both GitHub and the raw service. I know there are usually all sorts of layers between that make interconnectivity logistically complicated, but am I wrong that at the top-level it’s that simple?
That is too simple for the feature they are using. The client itself has its own cache and the only way to fully prevent traffic from a client is to tell it content it caches will remain valid for some amount of time into the future. For URLs that return the latest entry there is no valid amount of time known in advance by GitHub unless they want to introduce mandatory publication delays. For URLs of specific change…
The server side would require pushing any invalidation to (I imagine) whole tree of caches, which isn't exactly that hard if you plan for it from the start and have some way of upstream telling downstream file changes, but, well, they probably don't as I'd imagine they didn't expected people to pin their infrastructure to some binary blob on github that mutates
Re: GitHub is aggressively caching raw.github, breaking many use cases
#118There are two hard problems in IT: cache invalidation, naming things and off-by-one errors.
There are actually only two hard problems in computer science: 0) Cache invalidation 1) Naming things 5) Asynchronous callbacks 2) Off-by-one errors 3) Scope creep 6) Bounds checking
Re: GitHub is aggressively caching raw.github, breaking many use cases
#119Earlier quoted context omitted.
That doesn't solve cache invalidation; that just means you're always invalidating the cache even in cases where you don't actually want to.
Content addressing causes the name to change only when the content changes, which also means the name doesn't change if the content doesn't change, this by definition you don't have spurious cache invalidations
As long as name client asks for (even if it is reference) is constant, it can have cache problems. Of course it makes it simpler as youc an opt to cache it so short that invalidation is less of an issue, but that's again working around cache invalidation
Re: GitHub is aggressively caching raw.github, breaking many use cases
#120Reading the comment threads on GitHub, some files get a TTL of 300, some get a TTL of 86400. The "why" is certainly an interesting question.