Live data from Hacker News

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

github.com

41–50 of 145 posts

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

#41
post #40

A bug: See https://github.com/orgs/community/discussions/46691#discussi... (Well, if we believe the statement "github engineer here". Of course every clown could write that, too)

If you look at their profile[0], you can see they are a member of the GitHub organization and that they are marked as GitHub staff.

[0]: https://github.com/antn

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

#42
post #23

Earlier quoted context omitted.

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

> That's why the two things are together in that maxim.

I think you missed the joke.

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

#43
post #20

This seems reasonable to me. Caches should last longer; if you want to be sure of you get the latest version, rename the file. a good trick is to include the hash of the file in the name to get content-addressing à la IPFS.

So we need to use file_dec_2, file_nov_2, the sort of hacks version control systems were meant to replace?

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

#44
post #40

A bug: See https://github.com/orgs/community/discussions/46691#discussi... (Well, if we believe the statement "github engineer here". Of course every clown could write that, too)

If you look at their profile[0], you can see they are a member of the GitHub organization and that they are marked as GitHub staff. [0]: https://github.com/antn

How do you see that? At leat in my mobile browser nothing jumps into my eye. This user has contributions to @github, but very few.

Edit: Found it. Need to click on one of the achievements. Then the layout changes and it appears in the lower left corner under Organizations.

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

#45
post #37
post #20

This seems reasonable to me. Caches should last longer; if you want to be sure of you get the latest version, rename the file. a good trick is to include the hash of the file in the name to get content-addressing à la IPFS.

So we are back to file_v1, file_v1.1, file_v1.2 etc?

Nah, file_v1_final_final_REALLY_final

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

#46
post #20

This seems reasonable to me. Caches should last longer; if you want to be sure of you get the latest version, rename the file. a good trick is to include the hash of the file in the name to get content-addressing à la IPFS.

The commit ID seems to be part of the URL you can use

https://raw.githubusercontent.com/burekasKodi/repository.bur...

I'm fine with them caching "latest" tbh.

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

#47
post #23

Earlier quoted context omitted.

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

> Not sure why people think it has to so with naming variables or functions...

I think it’s open to interpretation. And I think it is valid to apply the saying to naming of variables, functions, and many other things.

See

https://skeptics.stackexchange.com/questions/19836/has-phil-...

Links to

https://www.karlton.org/2017/12/naming-things-hard/

Links to a bunch of places.

None of the ones I looked at seem to confidently say what was originally meant by the saying.

Either way, regardless of what the guy meant when he originally used to say it, it’s allowed to apply a saying to new situations.

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

#48
post #20

This seems reasonable to me. Caches should last longer; if you want to be sure of you get the latest version, rename the file. a good trick is to include the hash of the file in the name to get content-addressing à la IPFS.

> if you want to be sure of you get the latest version, rename the file.

This is a beyond ridiculous statement. It is a BUG that you do not get the latest version of the file when viewing raw, not an error you made that you should address by having a filename driven versioning system.

If I'm using Git and GitHub, it's specifically to NOT have to deal with v1, v1.1, final, final_for_real, final_of_the_finalest, this_time_its_really_final.

Your suggestion to work around this GitHub bug is to essentially not use Git. Ridiculous.

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

#49
post #44

Earlier quoted context omitted.

If you look at their profile[0], you can see they are a member of the GitHub organization and that they are marked as GitHub staff. [0]: https://github.com/antn

How do you see that? At leat in my mobile browser nothing jumps into my eye. This user has contributions to @github, but very few. Edit: Found it. Need to click on one of the achievements. Then the layout changes and it appears in the lower left corner under Organizations.

It doesn't appear to be visible on mobile, only desktop.

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

#50
post #20

This seems reasonable to me. Caches should last longer; if you want to be sure of you get the latest version, rename the file. a good trick is to include the hash of the file in the name to get content-addressing à la IPFS.

So we need to use file_dec_2, file_nov_2, the sort of hacks version control systems were meant to replace?

You can use git or use the commit sha, you only need to name the files if you refuse to use the provided versioning and tooling and want GitHub to act as a file host.
Post reply on HN