diff --git a/src/renderer.lisp b/src/renderer.lisp index 93372d4..422436c 100644 --- a/src/renderer.lisp +++ b/src/renderer.lisp @@ -17,15 +17,9 @@ (defmethod jingle:process-response ((app jingle:app) result) (set-response-header :content-type "text/html; charset=utf-8") (when (eq (request-method *request*) :get) - (set-response-header :cache-control (cond ((string= (website-env) "dev") - "private, no-store") - ((eq (context :cache) :static) - "public, max-age=60, s-maxage=604800") - ((eq (context :cache) :dynamic) - "public, max-age=60") - (t - "private, no-store")))) - + (set-response-header :cache-control (if (string= (website-env) "dev") + "private, no-store" + "public, max-age=60"))) (call-next-method app (render-to-string (hsx (html :lang "ja" diff --git a/src/routes/about.lisp b/src/routes/about.lisp index e2af4ad..5f74a4d 100644 --- a/src/routes/about.lisp +++ b/src/routes/about.lisp @@ -19,6 +19,5 @@ (defun handle-get (params) (declare (ignore params)) - (setf (context :cache) :dynamic) (setf (context :metadata) *metadata*) (~page)) diff --git a/src/routes/blog.lisp b/src/routes/blog.lisp index ce86076..307009d 100644 --- a/src/routes/blog.lisp +++ b/src/routes/blog.lisp @@ -14,6 +14,5 @@ (defun handle-get (params) (declare (ignore params)) - (setf (context :cache) :dynamic) (setf (context :metadata) *metadata*) (~page)) diff --git a/src/routes/index.lisp b/src/routes/index.lisp index e3f542d..9a84f35 100644 --- a/src/routes/index.lisp +++ b/src/routes/index.lisp @@ -1,7 +1,6 @@ (defpackage #:website/routes/index (:use #:cl - #:hsx - #:jingle) + #:hsx) (:export #:handle-get #:handle-head)) (in-package #:website/routes/index) @@ -44,7 +43,6 @@ (defun handle-get (params) (declare (ignore params)) - (setf (context :cache) :static) (~page)) ; for health check diff --git a/src/routes/not-found.lisp b/src/routes/not-found.lisp index 9e05d65..9e8db35 100644 --- a/src/routes/not-found.lisp +++ b/src/routes/not-found.lisp @@ -19,6 +19,5 @@ "Back to TOP")))) (defun handle-not-found () - (setf (context :cache) :dynamic) (setf (context :metadata) *metadata*) (~page)) diff --git a/src/routes/work.lisp b/src/routes/work.lisp index 663bc80..2a62a27 100644 --- a/src/routes/work.lisp +++ b/src/routes/work.lisp @@ -19,6 +19,5 @@ (defun handle-get (params) (declare (ignore params)) - (setf (context :cache) :dynamic) (setf (context :metadata) *metadata*) (~page))