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 3.0 "Montgomery Scott" on Tue Dec 22 13:45:03 2020 GMT+0.
• Introduction | What http-get-cache is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
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: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The http-get-cache system |
Michael J. Forster <mike@forsterfamily.ca>
MIT
Common Lisp library for caching HTTP GET responses
0.1.1
drakma
http-get-cache.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The http-get-cache.asd file | ||
• The http-get-cache/package.lisp file | ||
• The http-get-cache/http-get-cache.lisp file |
Next: The http-get-cache/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
http-get-cache.asd
http-get-cache (system)
Next: The http-get-cache/http-get-cache․lisp file, Previous: The http-get-cache․asd file, Up: Lisp files [Contents][Index]
http-get-cache (system)
package.lisp
Previous: The http-get-cache/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
http-get-cache (system)
http-get-cache.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The http-get-cache package |
package.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions | ||
• Exported conditions | ||
• Exported structures |
Next: Exported conditions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
http-get-cache.lisp (file)
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.
http-get-cache.lisp (file)
Create and return a CACHE with the optionally supplied TTL. TTL defaults to 300.
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
Next: Exported structures, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Superclass for all errors signaled by HTTP-GET.
http-get-cache.lisp (file)
error (condition)
http-get-not-found (condition)
Signalled by HTTP-GET when a RESPONSE for the URI
is neither cached nor available via an HTTP GET request.
http-get-cache.lisp (file)
http-get-error (condition)
http-get-not-found-uri (method)
:uri
http-get-not-found-uri (generic function)
Previous: Exported conditions, Up: Exported definitions [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.
http-get-cache.lisp (file)
structure-object (structure)
(make-hash-table :test (function equal))
cache-responses (function)
(setf cache-responses) (function)
(bordeaux-threads:make-lock "http-get-cache")
cache-mutex (function)
(setf cache-mutex) (function)
cache-ttl (function)
(setf cache-ttl) (function)
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.
http-get-cache.lisp (file)
structure-object (structure)
response-status-code (function)
(setf response-status-code) (function)
response-headers (function)
(setf response-headers) (function)
response-body (function)
(setf response-body) (function)
response-timestamp (function)
(setf response-timestamp) (function)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal constants | ||
• Internal functions | ||
• Internal generic functions |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
http-get-cache.lisp (file)
http-get-cache.lisp (file)
Next: Internal generic functions, Previous: Internal constants, Up: Internal definitions [Contents][Index]
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
http-get-cache.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
http-get-cache.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F H L |
---|
Jump to: | F H L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
C F G H M R U |
---|
Jump to: | %
(
C F G H M R U |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | +
B C H M R S T U |
---|
Jump to: | +
B C H M R S T U |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C H P R S |
---|
Jump to: | C H P R S |
---|