From: "Ludovic Courtès" <ludo@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: Caching calls to download-to-store?
Date: Thu, 28 Nov 2024 09:33:40 +0100 [thread overview]
Message-ID: <87zflj69ln.fsf@gnu.org> (raw)
In-Reply-To: <87zflkctrz.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 27 Nov 2024 21:21:20 +0100")
Hi,
Ricardo Wurmus <rekado@elephly.net> 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’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.
HTH,
Ludo’.
next prev parent reply other threads:[~2024-11-28 8:34 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 [this message]
2024-11-28 10:21 ` Ricardo Wurmus
2024-11-29 15:31 ` Simon Tournier
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=87zflj69ln.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@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).