GNU bug report logs -
#37207
nginx serving files from the store returns Last-Modified = Epoch
Previous Next
Full log
View this message in rfc822 format
Hi Tobias,
Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:
> Turning these off will of course prevent all caching. I don't know if
> that would add measurable load to guix.gnu.org (it would be more
> problematic if we used a CDN, but it might still make a difference).
>
> Nix does something both interesting and icky — as always: patch[0]
> nginx to look up the realpath() instead, so clients can still cache
> using If-None-Match.
> [0]: https://github.com/NixOS/nixpkgs/pull/48337
(See
<https://raw.githubusercontent.com/NixOS/nixpkgs/9bc23f31d29138f09db6af52708a9b8b64deec64/pkgs/servers/http/nginx/nix-etag-1.15.4.patch>.)
I had overlooked this patch but it looks like the right approach
overall. Calling ‘realpath’ each time seems a bit expensive as it
creates an ‘lstat’ storm, but I can’t think of a better solution.
I also found this post whose main interest is in showing how to write a
plugin to generate custom etags:
https://mikewest.org/2008/11/generating-etags-for-static-content-using-nginx/
Thoughts?
Ludo’.
This bug report was last modified 5 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.