summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2018-05-27 10:51:04 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2018-05-27 10:51:04 +0200
commit87d26e7b5b94bea662ffb23ef9cc9b6b9d849696 (patch)
tree123ab6f7d09366281b0962fdf0bdd229d1168579
parent6ebd6036445a0a4527bd5bec67fa97528272b1a2 (diff)
Take `full-p` into account when querying the cache.
This makes the “full archive” link work.
-rw-r--r--mulkcms.lisp14
1 files changed, 8 insertions, 6 deletions
diff --git a/mulkcms.lisp b/mulkcms.lisp
index 852b8e5..543cb12 100644
--- a/mulkcms.lisp
+++ b/mulkcms.lisp
@@ -145,7 +145,7 @@
(parse-integer (elt groups 4))))))
-(defun call-with-cache (path last-update content-type characteristics thunk)
+(defun call-with-cache (path last-update content-type characteristics full-p thunk)
(when (eq *request-method* :post)
(return-from call-with-cache
(let ((result (funcall thunk)))
@@ -171,9 +171,10 @@
(list :return-code 304)) ;;304 Not Modified
)))
(let* ((chars characteristics)
- (charstring (format nil "~A; ssl=~A"
+ (charstring (format nil "~A; ssl=~A; full=~A"
(prin1-to-string chars)
- *use-ssl-p*))
+ *use-ssl-p*
+ full-p))
(charbytes (flexi-streams:string-to-octets
charstring
:external-format :utf-8))
@@ -216,9 +217,9 @@
generated-content)))))
-(defmacro with-cache ((path last-update &optional content-type characteristics)
+(defmacro with-cache ((path last-update &optional content-type characteristics full-p)
&body body)
- `(call-with-cache ,path ,last-update ,content-type ,characteristics
+ `(call-with-cache ,path ,last-update ,content-type ,characteristics ,full-p
(lambda () ,@body)))
@@ -598,7 +599,8 @@
:test #'string=)
"application/atom+xml; charset=UTF-8"
"text/html; charset=UTF-8")
- characteristics)
+ characteristics
+ full-p)
(let* (#+portable-mulkcms
(articles (find-journal-articles))
#+portable-mulkcms