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: Simon Tournier
Subject: Re: Caching calls to download-to-store?
Date: Fri, 29 Nov 2024 16:31:37 +0100

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 via email to

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