From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WJUBNP0qSGe6zAAAe85BDQ:P1 (envelope-from ) for ; Thu, 28 Nov 2024 08:34:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id WJUBNP0qSGe6zAAAe85BDQ (envelope-from ) for ; Thu, 28 Nov 2024 09:34:05 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=aOCUOl5X; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732782845; a=rsa-sha256; cv=none; b=hin9W0+5HSobndCqhrBRL6UVmaIYrLE+nHk33o5QGI5Pg39Y+Ry18rMfsYVtRCJrq3mg6g rbdIyRggGUzpcf8JmG3HgPrBZg5rh8j3uwzz/NXj0e3khF/uXMo0GH2VqclfhiBt3ErjUY JjiOzl1sDlBF0mvW8KQ7wHnD8pZDwMxO0fNwD6SS6/aH+Pc40fk1VEELEF13ATWtUGfZqF n2AF5Gq5KG8t5Snuribgor93JRMb+r5gKAYr9HYUNTHvh+RbafloUUULwOo2sxnBMwmEag thrsg2r0sItVx1hNCMU8RW/+CJJzXHFIOKY3kqDMbKSGyBMJXIfAtJy3xVzluA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=aOCUOl5X; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732782845; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=+ycmrfMrw7meKhmpdX9hV97hsBTmB6PK1UJTAb8K2DM=; b=MO4jxmnHrVcaQKFXuC0wgk107sYoV5xwIM9OW5VDoX4TQDgOrDqQsgY7+gkQULTwtIRupb HZNv9BdEK4fbmO1ii/Mkxe7jIVDJzzBNjRBU81czb90h+XtTBmGBmTYW/yEMe4z9UOKJzj QOzG71JFJhfYKfM9t2ul6WnkenHKtNVNHm9Fs6hhHqvhPPQ8EdiAjHg4dxJzU+Mvz16wgY /wTY5hW+yiqhHK20HBeY3F1ywI1pCla2uPqMXug9xqQTnLdFgdQeswah+ZRL+QvO9duTQV OBvwyRRsO0bJnCm3BP1dv6AHjdsIz1R9iIBxIHtRuGbaMUtnxqfvmb5VI0DAPg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A1B4B3F1A for ; Thu, 28 Nov 2024 09:34:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGZy5-0000KA-0J; Thu, 28 Nov 2024 03:33:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGZy3-0000Jb-6H for guix-devel@gnu.org; Thu, 28 Nov 2024 03:33:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGZy2-0003a6-Io; Thu, 28 Nov 2024 03:33:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=+ycmrfMrw7meKhmpdX9hV97hsBTmB6PK1UJTAb8K2DM=; b=aOCUOl5Xz4gfD8ku0dCq gSFFow9a+zjxLltN2ZuFp0+1kytTG92cZ9sGOiwN/KR4CSgBHdYB6lYKd9XRNRw/J9S6ba5YDBBLj vorOZV2fBW8Vtbklwfwglcq/VYdV6aZE9aaiGwF9tqee/llmTkDeAPi5gTRSVUviyMcT7aiwyW25/ mtbk79P6pXqllXMn+CdrnPUKrEOwh6w43kiGFU585hOMsJXWsSrbcbkjcMYXq9JBWYLQx1xVeZm4H 6/esU0h0JSZ0U1nIvAd6pioxNCqrD94wABfuRQ/cbAbNFJIDS42o9C77DBUbVaSrLbMyPGsmIcUzY lK/B2QiHeqrt2Q==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Cc: guix-devel@gnu.org Subject: Re: Caching calls to download-to-store? In-Reply-To: <87zflkctrz.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 27 Nov 2024 21:21:20 +0100") References: <87zflkctrz.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 8 Frimaire an 233 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du Miel X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 28 Nov 2024 09:33:40 +0100 Message-ID: <87zflj69ln.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.17 X-Spam-Score: -4.17 X-Migadu-Queue-Id: A1B4B3F1A X-Migadu-Scanner: mx12.migadu.com X-TUID: /mNd8r2g9LUC Hi, Ricardo Wurmus skribis: > the CRAN updater downloads every upstream archive three times. The > importer memoizes calls to the download procedure, but one download that > is out of reach is the very first. > > It is triggered by package-update/url-fetch in (guix upstream). It uses > download-to-store, which will unconditionally fetch whatever URL it is > given. Why three times (and not two)? > I would very much like to parameterize download-to-store, so that we can > optionally cache the results of its invocation. I=E2=80=99m not sure exactly how to do that, but why not. Another option would be to register GC roots (or mere symlinks) in ~/.cache for things that are downloaded, and then to use =E2=80=98If-Modified-Since=E2=80=99 plus some default TTL to determine whet= her to re-download things. HTH, Ludo=E2=80=99.