From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eO4sMFz1AGJUMAAAgWs5BA (envelope-from ) for ; Mon, 07 Feb 2022 11:33:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GDL7KFz1AGIwdwEAG6o9tA (envelope-from ) for ; Mon, 07 Feb 2022 11:33:00 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 688EB3DB4D for ; Mon, 7 Feb 2022 11:33:00 +0100 (CET) Received: from localhost ([::1]:35744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH1KN-0006bj-Fy for larch@yhetil.org; Mon, 07 Feb 2022 05:32:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH0a9-0005bR-9h for guix-patches@gnu.org; Mon, 07 Feb 2022 04:45:13 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nH0Zy-0000fj-2s for guix-patches@gnu.org; Mon, 07 Feb 2022 04:45:12 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nH0Zx-0003re-TS for guix-patches@gnu.org; Mon, 07 Feb 2022 04:45:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53818] [PATCH v2 4/7] import: json: Make 'json-fetch' take '#:cached?' argument. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Feb 2022 09:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53818 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen , 53818@debbugs.gnu.org Received: via spool by 53818-submit@debbugs.gnu.org id=B53818.164422709214823 (code B ref 53818); Mon, 07 Feb 2022 09:45:01 +0000 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: From: Maxime Devos 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644229980; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=UJfqZcvL6+kWbnw47m3i0bRacF+zeSTl7XqSCxtsDaQ=; b=QEW2mLqTUSj/OAJOJtXuOxzEqv4XBfcP861SVEo0BefTwI9Oh0KdUsnePoPIAcTei290D5 1hqjQqsAMpP0YYLJWaR6N18aG77wkFVT271oHW1+nrUNwYxh5v6R3PNwut+mFOR19koD30 lbVkba4H0MNTwX7Xft88HzdxTeDRxG/WISEZ/LyK+DNztjEygKM0QBJWS8AIkM5GB8Iy38 6ADXWjmt8UB0xaM2+ndq447HrpjMDzO86+TCwKdO0DLles59hWlUbRpeVLHL7/M2M/+xqE wnzQjPouEfnqVX+nA581v8hdwciayxVNs87FmL8Jy3o2SK2L7JLDdhEjloxXTA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644229980; a=rsa-sha256; cv=none; b=POu1IEWU2frWWVBN+T4YilKlMSwmHB20LDOz90bPnKsBxOUrLGBVQY27g+DnNVxjF2+l3s 3F4pBPHsBNG3mmEWiTIb4PqCWrAXH7htmwL0xKdkcVTrRkM3qTTr2RssbtNDYpEuhLmt5Q /TrmSIjAJIJoBHmXYF5c01RIvO8JbqmQtC923pN1opRQGBNmmMKMctbcItQ+rugWOL/yvZ G1mkyj1L2jFjXRoO52GA1w0IuGwuZiS8RwJxshAdEIZumO6iXYMFlJ1WV+8483aQ6Qgfuv du4sxXGNWr5ZcLQJpm43uREyRLCNZfK+pittJbpbsm2UUPDpmXdX2q76Tei57g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=c7pXEkUl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=c7pXEkUl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 688EB3DB4D X-Spam-Score: -4.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1TLy77rfEW/z --=-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--