From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QNLGHLLxSWdWHgEAe85BDQ:P1 (envelope-from ) for ; Fri, 29 Nov 2024 16:54:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id QNLGHLLxSWdWHgEAe85BDQ (envelope-from ) for ; Fri, 29 Nov 2024 17:54:10 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PVs79iyA; 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"; dmarc=pass (policy=none) header.from=gmail.com 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 CDC628458B for ; Fri, 29 Nov 2024 17:54:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tH4Eu-0007WK-DQ; Fri, 29 Nov 2024 11:53:08 -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 1tH4Er-0007VS-UZ for guix-devel@gnu.org; Fri, 29 Nov 2024 11:53:06 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tH4Eo-0002JG-C0; Fri, 29 Nov 2024 11:53:04 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-382411ea5eeso1247116f8f.0; Fri, 29 Nov 2024 08:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732899179; x=1733503979; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TlKvEBMxN8vGdgEGOIixg84kD4Bw6YmBcAMYyi6Hdb4=; b=PVs79iyAvjq8jVTC+eeJyHJEhBExh1CzanFEQCDx13krBhn/c7OiDDDLRSq/fHv6PX XUsjIBsDK24qNvYHPoWSn5XMgPHPwLBXqDGpfcyLHd/1IYxEdrAFoIDyS+lAQ8U35AuO wbit7LWMAFCmvb/ijv7Fw6rcce3TASIRGHucpPvNUX0C9Z9mDbLtNARpwGJkXX60mXd7 SrqoquveFsqpNFthcp+qWDsRFlmLrAbKuEXx2mx1sRrGLgfrnb9ECryojq7M+j1Ch7PH O9dwOyitEPgPSLF+T7peD9IWYZiO88Gsy+DsL42m2WwEqITigG+UY/gQE8OpPxi3bGM+ eSyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732899179; x=1733503979; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TlKvEBMxN8vGdgEGOIixg84kD4Bw6YmBcAMYyi6Hdb4=; b=BQGI5m+zITsZ6Y0UytCoJ3F8s+izeUeboE+A3S97kvYXlKK/OboLDvSk/WN+aagxiM vEdrT1pvmVmscSbi9CVNvT35wZ4f9vz4XSngEhyOGGhgpe9HumEDzW2l6I/Py/Cs28Zm QKWRJnioxaXYH2SVYKaskDnlsDl/LbFdkQIwtkeoAHbY5yc28qmwdLyRpnb9Qs+jmkal w/ZDM2gCUVs4BmrKywqOWRtgfm+2i+Nd/wo1fFNCZ8YqPJ4zeVzsyKUOn3JQhM+Lew1P KnUZBbWgo/Cqu3XvEyCITEo5F+al+eDTdWcnxX1DE2JJAviwOPYP2018sAC8ehXNq38+ DRMg== X-Forwarded-Encrypted: i=1; AJvYcCVF+XCZ8FNNosgHih1XCyPKj2UhzF5inaILf7EXyTMaERLz5jcALnOjTllVU1So2tKoLoAY@gnu.org X-Gm-Message-State: AOJu0YxC5PmWS0OFpNG8MIlpv3lNKrSLBDsn+flsp1Z6cQv9F8/8jbHV Zon+H81FPypILI+0J/mIj8S7fXpL1L84XOQp5p9kWcocP1Lk56a31k4XWw== X-Gm-Gg: ASbGncsdLlNm1Z6RaUfW6n+rlMsBddjwLaU/Ik//FUaRuC2iGXoVaUZGxMGc6ZNiZJs 4tLYOpi5MQUzbkVhxpBjf/a7g/hHC/7uFbdpFnta0f2uB/uUuU9Xeo+o95k3kWDT7v39V21IGow vJED9CCDlgHjj1BxfzUtGEJnnyavZTw/9matHF2MN0fhZg1xM4rRYezR2Wumx4RWqXERU+h4oBI o46HGrzTCmwsz9mVwvTmdKo+r68z1G6fqNV9oGJeV9ELhYp1Wb/tFRuXf55C+zZg3PFoTjAMSRD 1AbuwF1+dKWT+rquY7tx62yNHW+ADraHBUo= X-Google-Smtp-Source: AGHT+IFZYHaoCs/HlxZwMc8MRKAnJExw2aG+CHwJeQLtF9dDx6jiKu5d4uMN+lSbz8a6anBiloSZdw== X-Received: by 2002:a5d:64ed:0:b0:382:3cb8:bd4c with SMTP id ffacd0b85a97d-385cbd74950mr7829362f8f.12.1732899177968; Fri, 29 Nov 2024 08:52:57 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-44.net.univ-paris-diderot.fr. [194.254.61.44]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385e13e8eadsm706206f8f.28.2024.11.29.08.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2024 08:52:57 -0800 (PST) From: Simon Tournier To: Ricardo Wurmus , Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Subject: Re: Caching calls to download-to-store? In-Reply-To: <87iks7d5g1.fsf@elephly.net> References: <87zflkctrz.fsf@elephly.net> <87zflj69ln.fsf@gnu.org> <87iks7d5g1.fsf@elephly.net> Date: Fri, 29 Nov 2024 16:31:37 +0100 Message-ID: <87r06udpk6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -4.37 X-Spam-Score: -4.37 X-Migadu-Queue-Id: CDC628458B X-TUID: dtZ3CeB4Ttsw Hi, On Thu, 28 Nov 2024 at 11:21, Ricardo Wurmus wrote: >> Why three times (and not two)? Yeah three times, weird. > Not entirely sure, but it's tracked here > > https://issues.guix.gnu.org/48792 > https://issues.guix.gnu.org/44256 > > I'm already caching some downloads in the updater, but it's not always > working as intended. (I have an unfinished fix for this locally.) Ah cool! >>> 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 w= hether to >> re-download things. > > That's a good idea. Currently, we download to arbitrary temporary > directories. The downloads performed by importers vanish immediately. If we populate some ~/.cache/guix then what would trigger the clean up of such cache? Cheers, simon