GNU bug report logs - #53818
[PATCH 0/3] Add Repology updater

Previous Next

Package: guix-patches;

Reported by: Xinglu Chen <public <at> yoctocell.xyz>

Date: Sun, 6 Feb 2022 11:52:02 UTC

Severity: normal

Tags: patch

Full log


Message #95 received at 53818 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Xinglu Chen <public <at> yoctocell.xyz>, 53818 <at> debbugs.gnu.org
Subject: Re: [bug#53818] [PATCH v2 4/7] import: json: Make 'json-fetch' take
 '#:cached?' argument.
Date: Mon, 07 Feb 2022 10:44:44 +0100
[Message part 1 (text/plain, inline)]
Xinglu Chen schreef op ma 07-02-2022 om 10:07 [+0100]:
> +    (let* ((port   ((if cached?
> +                        http-fetch/cached
> +                        http-fetch)

Personally, instead of introdicing a cached? argument,
I would introduce a 'http-fetch' argument defaulting to 'http-fetch',
such that users of 'json-fetch' can set all the options of
'http-fetch/cached' (ttl, cache-miss ...).

(json-fetch #:http-fetch
            (lambda (uri . rest)
              (apply http-fetch/cached uri #:ttl foo #:cache-miss bar
                     rest)))

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.