This is the http-get-cache Reference Manual, version 0.1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:23:28 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
http-get-cache
Common Lisp library for caching HTTP GET responses
Michael J. Forster <mike@forsterfamily.ca>
MIT
0.1.1
drakma
(system).
package.lisp
(file).
http-get-cache.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
http-get-cache/http-get-cache.asd
http-get-cache
(system).
http-get-cache/http-get-cache.lisp
package.lisp
(file).
http-get-cache
(system).
cache
(structure).
cache-ttl
(reader).
(setf cache-ttl)
(writer).
http-get
(function).
http-get-error
(condition).
http-get-not-found
(condition).
make-cache
(function).
response
(structure).
response-body
(reader).
(setf response-body)
(writer).
response-headers
(reader).
(setf response-headers)
(writer).
response-status-code
(reader).
(setf response-status-code)
(writer).
response-timestamp
(reader).
(setf response-timestamp)
(writer).
%make-cache
(function).
+http-not-modified+
(constant).
+http-ok+
(constant).
cache-mutex
(reader).
(setf cache-mutex)
(writer).
cache-p
(function).
cache-responses
(reader).
(setf cache-responses)
(writer).
copy-cache
(function).
copy-response
(function).
http-get-not-found-uri
(reader method).
make-response
(function).
response-fresh-p
(function).
response-p
(function).
uri-key
(function).
Packages are listed by definition order.
http-get-cache
common-lisp
.
cache
(structure).
cache-ttl
(reader).
(setf cache-ttl)
(writer).
http-get
(function).
http-get-error
(condition).
http-get-not-found
(condition).
make-cache
(function).
response
(structure).
response-body
(reader).
(setf response-body)
(writer).
response-headers
(reader).
(setf response-headers)
(writer).
response-status-code
(reader).
(setf response-status-code)
(writer).
response-timestamp
(reader).
(setf response-timestamp)
(writer).
%make-cache
(function).
+http-not-modified+
(constant).
+http-ok+
(constant).
cache-mutex
(reader).
(setf cache-mutex)
(writer).
cache-p
(function).
cache-responses
(reader).
(setf cache-responses)
(writer).
copy-cache
(function).
copy-response
(function).
http-get-not-found-uri
(generic reader).
make-response
(function).
response-fresh-p
(function).
response-p
(function).
uri-key
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
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
.
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.
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.
http-get-not-found
)) ¶uri
.
Jump to: | %
(
C F G H M R U |
---|
Jump to: | %
(
C F G H M R U |
---|
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 |
---|