bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37207: guix.gnu.org Last Modified at epoch


From: Gábor Boskovits
Subject: bug#37207: guix.gnu.org Last Modified at epoch
Date: Wed, 28 Aug 2019 21:42:20 +0200

Hello Tobias,

Tobias Geerinckx-Rice via Bug reports for GNU Guix <address@hidden> 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 checkout.

Retrieve these with embededd perl.
Wdyt?
 
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,
g_bor

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]