Subject: [bug#53818] [PATCH v2 4/7] import: json: Make 'json-fetch' take '#:cached?' argument.

From: Maxime Devos <[email-masked]>
Date: Mon, 07 Feb 2022 10:44:44 +0100

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.