summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-02-21 19:14:56 +0100
committerVivien Kraus <vivien@planete-kraus.eu>2021-02-21 19:14:56 +0100
commit87af2691a1891a9a1bbb57f86395995fb212921e (patch)
tree45dd4761ce6d79af482e8c9ecb60e10fc8eb3cac
parent65b9aff55cb001e69b85840e938d6833d7af335b (diff)
Fix docstring
-rw-r--r--web-client-with-cache.org15
1 files 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