From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#37207: guix.gnu.org Last Modified at epoch Date: Thu, 26 Sep 2019 10:39:45 +0200 Message-ID: <87wodvpi26.fsf@gnu.org> References: <875zmhliqj.fsf@gnu.org> <877e6xqrtw.fsf@nckx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44888) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDPJm-0008I0-EZ for bug-guix@gnu.org; Thu, 26 Sep 2019 04:40:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDPJj-0004sC-PE for bug-guix@gnu.org; Thu, 26 Sep 2019 04:40:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDPJj-0004qD-Lp for bug-guix@gnu.org; Thu, 26 Sep 2019 04:40:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iDPJi-0005EU-La for bug-guix@gnu.org; Thu, 26 Sep 2019 04:40:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <877e6xqrtw.fsf@nckx> (Tobias Geerinckx-Rice's message of "Wed, 28 Aug 2019 16:37:15 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Tobias Geerinckx-Rice Cc: 37207@debbugs.gnu.org Hi Tobias, Tobias Geerinckx-Rice 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 =E2=80=94 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 .) I had overlooked this patch but it looks like the right approach overall. Calling =E2=80=98realpath=E2=80=99 each time seems a bit expensiv= e as it creates an =E2=80=98lstat=E2=80=99 storm, but I can=E2=80=99t think of a be= tter 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-ng= inx/ Thoughts? Ludo=E2=80=99.