Hello Tobias,

Tobias Geerinckx-Rice via Bug reports for GNU Guix <bug-guix@gnu.org> ezt
írta (időpont: 2019. aug. 28., Sze, 16:38):

> Gábor, Ludo',
> Gábor Boskovits 写道:
> > Supressing the last modified header is just an
> > add_header Last-Modified "";
> > away.
> You'll also need:
> # Don't honour client If-Modified-Since constraints.
> if_modified_since off;
> # Nginx's etags are hashes of file timestamp & file length.
> etag off;
You really have a point here.

Based on my reseach, I came up with the following:

we need
etag off;

we should create a file with the git last modification time of the files,
updated when there is a new commit in the repo => last-modified
we should create a file with some hash of the files, updated when there is
a new commit in the repo => etag
we could restrict these operations to the files modified since the last

Retrieve these with embededd perl.

> 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.
> Kind regards,
> T G-R
> [0]: https://github.com/NixOS/nixpkgs/pull/48337

Best regards,

OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21

Reply via email to