Subject: Re: bug#52805: [PATCH] substitute: Add a ‘--clear-cache’ option.

From: Ludovic Courtès <[email-masked]>
Date: Wed, 12 Jan 2022 22:04:37 +0100

Hi,

Tobias Geerinckx-Rice <[email-masked]> skribis:

> Caching is never to my advantage: it is ‘saving’ only the work I asked
> it to perform, against my wishes.  ‘Look how fast I fed you possibly
> bogus data against your will!’ is not an impressive boast.
>
> Is my concern clear?  Reasonable?

It’s clear, but I’m not sure it’s reasonable.  :-)

When do you have to worry about caches?

‘guix weather’ can cache negative replies (404s) for
%narinfo-negative-ttl = 10mn, unless the server provides a different
‘Cache-Control’ TTL.  So there’s a possibility that during that time
window it’ll tell you “nope” when in fact the thing has just arrived.

I think that’s acceptable (there’s a slight delay but nothing’s
“bogus”), and it’s kind to server admins.

(It’s possible for admins to run ‘guix publish --negative-ttl=0’ if they
don’t mind extra traffic from users.)

That said, if you find it sufficiently annoying, what about adding
‘--clear-cache’ to ‘guix weather’?

HTH!

Ludo’.