guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Caching calls to download-to-store?


From: Ludovic Courtès
Subject: Re: Caching calls to download-to-store?
Date: Thu, 28 Nov 2024 09:33:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]