From 87af2691a1891a9a1bbb57f86395995fb212921e Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Sun, 21 Feb 2021 19:14:56 +0100 Subject: Fix docstring --- web-client-with-cache.org | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/web-client-with-cache.org b/web-client-with-cache.org index 824b135..95b8a86 100644 --- a/web-client-with-cache.org +++ b/web-client-with-cache.org @@ -497,7 +497,8 @@ The final function is [[fn-with-cache]]. It takes its docstring from #+begin_src texinfo Call @var{http-get} with a cache. @var{http-get} is a procedure that takes an URI, and optionally some headers and other arguments, and - either fails or returns two values: a response and a response body. + either fails or returns two values: a response and a response body. By + default, it is @code{http-get} from @code{(web client)}. The following headers are set by the caching function and are thus ignored from the additional arguments: @@ -508,16 +509,16 @@ The final function is [[fn-with-cache]]. It takes its docstring from @end itemize For cache validation without connecting to the server, - @var{current-time} is needed. It should be a SRFI-19 time or date. By - default, use the client system clock. + @var{current-time} is needed. It should be thunk, returning a SRFI-19 + time or date. By default, we use the client system clock. The returned function takes the same arguments as @var{http-get} from - @code{(web client)}, and also returns a response and a response body, - however some headers are filtered, and responses with 304 will be - converted to 200 with the help of the cache, if there is some. + @code{(web client)}, and also returns a response and a response body. The optional argument @code{#:box} can be used to use a specific - atomic box instead of one created just for the occasion. + atomic box instead of one created just for the occasion. If you + specify this argument, the contained value should be an alist, mapping + URIs to pairs of (response, response body). #+end_src #+name: fn-with-cache -- cgit v1.2.3