From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 07 04:44:52 2022 Received: (at 53818) by debbugs.gnu.org; 7 Feb 2022 09:44:52 +0000 Received: from localhost ([127.0.0.1]:41007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH0Zo-0003r0-5H for submit@debbugs.gnu.org; Mon, 07 Feb 2022 04:44:52 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:34038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH0Zj-0003qn-Ah for 53818@debbugs.gnu.org; Mon, 07 Feb 2022 04:44:50 -0500 Received: from [172.20.10.9] ([213.119.168.30]) by albert.telenet-ops.be with bizsmtp id s9kl260010fhH05069klMM; Mon, 07 Feb 2022 10:44:45 +0100 Message-ID: Subject: Re: [bug#53818] [PATCH v2 4/7] import: json: Make 'json-fetch' take '#:cached?' argument. From: Maxime Devos To: Xinglu Chen , 53818@debbugs.gnu.org Date: Mon, 07 Feb 2022 10:44:44 +0100 In-Reply-To: <92ca3095e8a5cf1197afd8883017c6b3729184f3.1644224421.git.public@yoctocell.xyz> References: <92ca3095e8a5cf1197afd8883017c6b3729184f3.1644224421.git.public@yoctocell.xyz> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-gNFnsbKpf5k/Pcke26mq" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1644227085; bh=UJfqZcvL6+kWbnw47m3i0bRacF+zeSTl7XqSCxtsDaQ=; h=Subject:From:To:Date:In-Reply-To:References; b=c7pXEkUlc7MhA3Od7bcRmVKoe89+9ydMFZ+YBz07/WbiNUPN3Xb42CuRYENS6E9a+ WX+UuLs8OmwADYyG0mfTGNf3mn9FnJ1HPjNxPxUFYcF6DAPhNuYMgI5cpyukJpcSrc zRJRSwxMbZwj9JQhm2ab/wt6QfdfulCKSTWZDJJdj+b5fSlHd6f7VWjSzutYLVHGlN A+ZTptFuY2wEv/8gYajx8BsR9w1kT5SYb/kXpONarm/QDQNINXRHDFb8xCgIREjfPc MEalXQ/N5TRVOA2/kGaEdi8sfCyGR6DNR/DE7PC0qCBomBjyYSar/Cuk5vnk6Zvmoi JIxs9VqBNZZeQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53818 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-gNFnsbKpf5k/Pcke26mq Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xinglu Chen schreef op ma 07-02-2022 om 10:07 [+0100]: > +=C2=A0=C2=A0=C2=A0 (let* ((port=C2=A0=C2=A0 ((if cached? > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 http-fet= ch/cached > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 http-fet= ch) 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. --=-gNFnsbKpf5k/Pcke26mq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYgDqDBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sxwAQDNfL5tyjmkkj6ApQ4VqpzMrZo7 Hi93XM6SPbJ4anLh5wEApsPV7vnDzaY0SkEMb46PFyB7fKejHA0vbblafBOMBQ4= =+w6J -----END PGP SIGNATURE----- --=-gNFnsbKpf5k/Pcke26mq--