unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ricardo Wurmus" <rekado@elephly.net>, "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Caching calls to download-to-store?
Date: Fri, 29 Nov 2024 16:31:37 +0100	[thread overview]
Message-ID: <87r06udpk6.fsf@gmail.com> (raw)
In-Reply-To: <87iks7d5g1.fsf@elephly.net>

Hi,

On Thu, 28 Nov 2024 at 11:21, Ricardo Wurmus <rekado@elephly.net> 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’m 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
>> ‘If-Modified-Since’ plus some default TTL to determine whether 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


      reply	other threads:[~2024-11-29 16:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27 20:21 Caching calls to download-to-store? Ricardo Wurmus
2024-11-28  8:33 ` Ludovic Courtès
2024-11-28 10:21   ` Ricardo Wurmus
2024-11-29 15:31     ` Simon Tournier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r06udpk6.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).