From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aPPHDqt54F+yEwAA0tVLHw (envelope-from ) for ; Mon, 21 Dec 2020 10:32:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aM2SCqt54F9EdQAAbx9fmQ (envelope-from ) for ; Mon, 21 Dec 2020 10:32:11 +0000 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 00E559403CA for ; Mon, 21 Dec 2020 10:32:10 +0000 (UTC) Received: from localhost ([::1]:46968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krIU5-0003OA-TY for larch@yhetil.org; Mon, 21 Dec 2020 05:32:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krITy-0003Nl-KZ for guix-patches@gnu.org; Mon, 21 Dec 2020 05:32:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krITy-0008Dq-CQ for guix-patches@gnu.org; Mon, 21 Dec 2020 05:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1krITy-0000Hc-8X for guix-patches@gnu.org; Mon, 21 Dec 2020 05:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45327] [PATCH] git: Periodically delete least-recently-used cached checkouts. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Dec 2020 10:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45327 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 45327@debbugs.gnu.org Received: via spool by 45327-submit@debbugs.gnu.org id=B45327.1608546691973 (code B ref 45327); Mon, 21 Dec 2020 10:32:02 +0000 Received: (at 45327) by debbugs.gnu.org; 21 Dec 2020 10:31:31 +0000 Received: from localhost ([127.0.0.1]:46387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krITT-0000Fd-D5 for submit@debbugs.gnu.org; Mon, 21 Dec 2020 05:31:31 -0500 Received: from mail-wr1-f41.google.com ([209.85.221.41]:42109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krITR-0000F8-Nr for 45327@debbugs.gnu.org; Mon, 21 Dec 2020 05:31:30 -0500 Received: by mail-wr1-f41.google.com with SMTP id m5so10488903wrx.9 for <45327@debbugs.gnu.org>; Mon, 21 Dec 2020 02:31:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=+9TSyUgyOjz3qGyCyOWmAMimH2KtRHQUkBjUMr2HRBY=; b=lQkzUvuNf6uFFrxFECsmR++b/jlD+lAKiwGTgks2SqlynM2vTbofQMcczNXBO9/rKf BTwgMk0YwZJSz3OTmiOJghIdsDK81rgyaLXCHclo2LuECc/TrZ+RsAVQNSFKmEpf2jVG gWBd3hUWChzMqHjWcK6sXRQcE3yLCuPiA0K80p83i0SPC7gJAOghQycwI7W8KWQcfleI CmAjtn/IVF1S1XN4Usi/5RbesQ7sWI9DsZnrWpMxCaSsk7A34NGGaC0Lf/ovcRjXJTrb JuYW1Y+If00scTSRmjO9SvP1QGvLQD7rc4IMuEXsJlzj5ZN9TX3UM6USp+gEX+5jFkzw 2V7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=+9TSyUgyOjz3qGyCyOWmAMimH2KtRHQUkBjUMr2HRBY=; b=X0SU3Fgfd3fEfUGSTGlTkicv8VDBQ3RmDZLHIRZ/vreSiFuYhdAU9I3CUsrEDqqOAM YGBJta7dV1spUzM7PqzHwoqbu7ZjLncQKCbJvcz5y27gW3QftHyGghIyiidZ0eQOFP/H xYifpQtSsvBFW5YaWx28qRNka1tjRJ8m95TNgTX4rYs2T4j7xLHCgWhGp2TQtJNGzD5u +Xpu+2NneH7a/599PfG7+aXCgAEdwkwp2Z9D8tMvntWyyJY4HE7okVRnbuFoqreO8M1R EJNoOstPV8XdYh0bp2nk0dt0Umqfl+Rjnl2fm50GuLea6wm4ZgwhcI5oI0km6iMASqfQ WeHQ== X-Gm-Message-State: AOAM532IkyZ0wU6Fir4Ykwj5TeAlxz30FPYt52ZkwxFLNcCiCo52K4PJ 8rb5t5n6Jisi/R6HMJ/r1kD+LadN5kQ= X-Google-Smtp-Source: ABdhPJx98PdarIJhNNUY+WnaX9dVd3wj4X5G7q8it7Yuekl6EO6Bwa4IiTGS0x+egzRlFuJvKGvRaw== X-Received: by 2002:a5d:6a05:: with SMTP id m5mr17684253wru.96.1608546683783; Mon, 21 Dec 2020 02:31:23 -0800 (PST) Received: from lili (oul69-1-82-232-2-3.fbx.proxad.net. [82.232.2.3]) by smtp.gmail.com with ESMTPSA id z63sm6167698wme.8.2020.12.21.02.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 02:31:23 -0800 (PST) From: zimoun In-Reply-To: <20201219220630.24605-1-ludo@gnu.org> References: <20201219220630.24605-1-ludo@gnu.org> Date: Mon, 21 Dec 2020 11:26:05 +0100 Message-ID: <86a6u7bgle.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.22 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=lQkzUvuN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 00E559403CA X-Spam-Score: -1.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: khMQy/SVAArp Hi Ludo, On Sat, 19 Dec 2020 at 23:06, Ludovic Court=C3=A8s wrote: > This ensures ~/.cache/guix/checkouts is periodically cleaned up. > > * guix/git.scm (cached-checkout-expiration) > (%checkout-cache-cleanup-period): New variables. > (delete-checkout): New procedure. > (update-cached-checkout)[cache-entries]: New procedure. > Add call to 'maybe-remove-expired-cache-entries'. > --- > guix/git.scm | 38 +++++++++++++++++++++++++++++++++++++- > 1 file changed, 37 insertions(+), 1 deletion(-) > > Hi! > > I noticed that my ~/.cache/guix/checkouts directory had accumulated > a lot of cruft from channels, playing with =E2=80=98--with-branch=E2=80= =99 and such, > and that it would be nice to clean it up once in a while. > > This is what this patch does. It uses the (guix cache) default > strategy, which consists in deleting least-recently-used items by > looking at their atime. This is done at pull time, right? Personally, I would prefer at gc time, and even maybe with an option to =E2=80=9Cguix gc=E2=80=9D. Because, IIUC, every 5 days, the entries older than 1 month will be deleted. As an extensive user of the time-machine, it means that I will do this extra work more than often, slowing down the already slow =E2=80=9Ctime-machine=E2=80=9D. Cheers, simon