Live data from Hacker News

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

github.com

11–20 of 145 posts

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

#11

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.

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

#12
post #7
post #3

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

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?

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

#13
post #7
post #3

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

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.

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

#15
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.

You just solve that by using another level of indirection. Duh.

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

#17

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.

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

I would guess GitHub is slowly cutting down on people (ab)using it for free file hosting. Files that are hit a lot probably get significantly longer cache timeouts.

Post reply on HN