Live data from Hacker News

GitHub is aggressively caching raw.github, breaking many use cases

github.com

21–30 of 145 posts

Re: GitHub is aggressively caching raw.github, breaking many use cases

#22

Reading 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.

If the TTL starts at 86400 and then declines to 0 before resetting.. this is a fairly common caching strategy... it ensures the cache will expire for all clients at around the same time. For example, if you want the client's cache to expire at midnight everyday.

Is that really common? That sounds like a recipe for disaster.

Re: GitHub is aggressively caching raw.github, breaking many use cases

#23
post #7

Earlier quoted context omitted.

You can eliminate the cache invalidation problem by not reusing old names for new things.

Doesn't that just move the problems to more "naming things" though?

Yes, naming things is intimately tied to cache invalidation. That's why the two things are together in that maxim. Not sure why people think it has to so with naming variables or functions...

Re: GitHub is aggressively caching raw.github, breaking many use cases

#24
post #13
post #7

Earlier quoted context omitted.

You can eliminate the cache invalidation problem by not reusing old names for new things.

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

Re: GitHub is aggressively caching raw.github, breaking many use cases

#25
post #18
post #3

There are two hard problems in IT: cache invalidation, naming things and off-by-one errors.

The Oxford comma would be useful here

You pretty much never have a list where "things" is somewhere other than the end.

Re: GitHub is aggressively caching raw.github, breaking many use cases

#26
post #8

Earlier quoted context omitted.

Has github fired most people capable of fixing problems?

Github did layoffs, yes. We'll see how much longer the site can stay up. This is a death rattle.

Lol, what a hilariously unfounded coclusion.

Re: GitHub is aggressively caching raw.github, breaking many use cases

#27

Earlier quoted context omitted.

If the TTL starts at 86400 and then declines to 0 before resetting.. this is a fairly common caching strategy... it ensures the cache will expire for all clients at around the same time. For example, if you want the client's cache to expire at midnight everyday.

Is that really common? That sounds like a recipe for disaster.

You could use the same mechanism to spread out the load

Re: GitHub is aggressively caching raw.github, breaking many use cases

#29
post #8

Earlier quoted context omitted.

Has github fired most people capable of fixing problems?

Github did layoffs, yes. We'll see how much longer the site can stay up. This is a death rattle.

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.
Post reply on HN