Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the http-get-cache Reference Manual, version 0.1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 04:45:43 2022 GMT+0.
Next: Systems, Previous: The http-get-cache Reference Manual, Up: The http-get-cache Reference Manual [Contents][Index]
http-get-cache is a Common Lisp library based on the Drakma HTTP client for caching HTTP GET responses.
http-get-cache depends on Drakma and Bordeaux Threads.
http-get-cache is being developed with SBCL, CCL, and LispWorks on OS X. http-get-cache is being deployed with SBCL on FreeBSD/AMD64 and Linux/AMD64.
(ql:quickload "http-get-cache")
(defvar *cache* (http-get-cache:make-cache 60))
(http-get-cache:http-get "http://planet.lisp.org/" *cache*)
#S(HTTP-GET-CACHE:RESPONSE
:STATUS-CODE 200
:HEADERS ((:SERVER . "nginx/1.9.0")
(:DATE . "Thu, 16 Mar 2017 04:56:47 GMT")
(:CONTENT-TYPE . "text/html") (:CONTENT-LENGTH . "128383")
(:LAST-MODIFIED . "Thu, 16 Mar 2017 04:15:56 GMT")
(:CONNECTION . "close") (:ETAG . "\"58ca117c-1f57f\"")
(:ACCEPT-RANGES . "bytes"))
:BODY "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<title>Planet Lisp</title>
...
</html>
"
:TIMESTAMP 3698629006)
http-get-cache is distributed under the MIT license. See LICENSE.
Next: Files, Previous: Introduction, Up: The http-get-cache Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Common Lisp library for caching HTTP GET responses
Michael J. Forster <mike@forsterfamily.ca>
MIT
0.1.1
drakma (system).
Next: Packages, Previous: Systems, Up: The http-get-cache Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: http-get-cache/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
http-get-cache (system).
Next: http-get-cache/http-get-cache.lisp, Previous: http-get-cache/http-get-cache.asd, Up: Lisp [Contents][Index]
http-get-cache (system).
Previous: http-get-cache/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
http-get-cache (system).
Next: Definitions, Previous: Files, Up: The http-get-cache Reference Manual [Contents][Index]
Packages are listed by definition order.
common-lisp.
Next: Indexes, Previous: Packages, Up: The http-get-cache Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Conditions, Previous: Public Interface, Up: Public Interface [Contents][Index]
ttl.
Return the RESPONSE for the supplied URI. If a fresh RESPONSE for
the URI exists in the CACHE then return that RESPONSE. If a stale
RESPONSE for the URI exists in the CACHE then attempt to validate the
RESPONSE with the origin server using the "If-None-Match" request
header and the "Etag" header of the RESPONSE and, if successful,
update the headers of the cached RESPONSE and return it. If no
RESPONSE for the URI exists in the CACHE then make an HTTP GET request
for the URI and, if successful, cache and return the RESPONSE;
otherwise, signal an error of type HTTP-GET-NOT-FOUND>
If URI is neither a PURI:URI nor a STRING, signal an error of type
TYPE-ERROR. If CACHE is not a CACHE, signal an error of type
TYPE-ERROR.
Unlike an RFC 7234 compliant HTTP cache, HTTP-GET-CACHE expires a stored RESPONSE according to the time the RESPONSE was received and the CACHE TTL. HTTP-GET-CACHE ignores the "Expires" header field and the "max-age" cache directive of the HTTP request and response.
Create and return a CACHE with the optionally supplied TTL. TTL defaults to 300.
body.
Next: Structures, Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Superclass for all errors signaled by HTTP-GET.
error.
Signalled by HTTP-GET when a RESPONSE for the URI
is neither cached nor available via an HTTP GET request.
:uri
This slot is read-only.
Previous: Conditions, Up: Public Interface [Contents][Index]
A CACHE is an object that stores successful responses to HTTP GET requests. A response is stored until its TTL–time to live, in seconds–expires.
A RESPONSE ia an object that stores the status code, headers, and body of an HTTP response, as well as the timestamp at which the response was received.
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Internals, Up: Internals [Contents][Index]
Next: Generic functions, Previous: Constants, Up: Internals [Contents][Index]
Previous: Ordinary functions, Up: Internals [Contents][Index]
uri.
Previous: Definitions, Up: The http-get-cache Reference Manual [Contents][Index]
Jump to: | %
(
C F G H M R U |
---|
Jump to: | %
(
C F G H M R U |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | +
B C H M R S T U |
---|
Jump to: | +
B C H M R S T U |
---|
Jump to: | C F H P R S |
---|
Jump to: | C F H P R S |
---|