| 10 Jul 2025 |
Arian | "How I made `nixos-rebuild switch 200% faster for everyone with this one weird trick" | 18:53:14 |
Arian | I just need to know if this was deliberately set up like this. Are we on purpose not caching 404s or by accident? | 18:53:29 |
Jeremy Fleischman (jfly) | It sure looks like the intent was to cache 404s. Here's the initial import into terraform, which has the "cache 404s" code: https://github.com/NixOS/infra/commit/ee995c5f3fee6d645a4a8fb9a93c57f3763b9f07#diff-75e932ae3525435283fff74680b6af8d8c83df93a23b10c7f0a9fcf0a6e4f3e9R179-R184 | 18:56:46 |
Arian | yeh so it actually does the opposite. 404s are cached by default by fastly and this breaks that :D | 18:57:08 |
Jeremy Fleischman (jfly) | i say, go delete some code | 18:57:40 |
Arian | well I think we still maybe want to replace the 404 payload with the string 404 otherwise we get some ugly XML blob from S3 | 18:58:31 |
Arian | but we should do it later in the VCL | 18:58:39 |
Zhaofeng Li | wait, do we have some kind of post-build-hook/s3 hook/etc to bust the cache after paths are built? | 18:59:03 |
emily | are you saying every Nix build in the universe is way slower than it should be because it's hitting S3 | 18:59:32 |
Arian | yes | 18:59:37 |
emily | (…does S3 bill for 404s?) | 18:59:39 |