parent
744a34df0c
commit
0563452775
6 changed files with 4 additions and 16 deletions
|
@ -17,15 +17,9 @@
|
||||||
(defmethod jingle:process-response ((app jingle:app) result)
|
(defmethod jingle:process-response ((app jingle:app) result)
|
||||||
(set-response-header :content-type "text/html; charset=utf-8")
|
(set-response-header :content-type "text/html; charset=utf-8")
|
||||||
(when (eq (request-method *request*) :get)
|
(when (eq (request-method *request*) :get)
|
||||||
(set-response-header :cache-control (cond ((string= (website-env) "dev")
|
(set-response-header :cache-control (if (string= (website-env) "dev")
|
||||||
"private, no-store")
|
"private, no-store"
|
||||||
((eq (context :cache) :static)
|
"public, max-age=60")))
|
||||||
"public, max-age=60, s-maxage=604800")
|
|
||||||
((eq (context :cache) :dynamic)
|
|
||||||
"public, max-age=60")
|
|
||||||
(t
|
|
||||||
"private, no-store"))))
|
|
||||||
|
|
||||||
(call-next-method app
|
(call-next-method app
|
||||||
(render-to-string
|
(render-to-string
|
||||||
(hsx (html :lang "ja"
|
(hsx (html :lang "ja"
|
||||||
|
|
|
@ -19,6 +19,5 @@
|
||||||
|
|
||||||
(defun handle-get (params)
|
(defun handle-get (params)
|
||||||
(declare (ignore params))
|
(declare (ignore params))
|
||||||
(setf (context :cache) :dynamic)
|
|
||||||
(setf (context :metadata) *metadata*)
|
(setf (context :metadata) *metadata*)
|
||||||
(~page))
|
(~page))
|
||||||
|
|
|
@ -14,6 +14,5 @@
|
||||||
|
|
||||||
(defun handle-get (params)
|
(defun handle-get (params)
|
||||||
(declare (ignore params))
|
(declare (ignore params))
|
||||||
(setf (context :cache) :dynamic)
|
|
||||||
(setf (context :metadata) *metadata*)
|
(setf (context :metadata) *metadata*)
|
||||||
(~page))
|
(~page))
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
(defpackage #:website/routes/index
|
(defpackage #:website/routes/index
|
||||||
(:use #:cl
|
(:use #:cl
|
||||||
#:hsx
|
#:hsx)
|
||||||
#:jingle)
|
|
||||||
(:export #:handle-get
|
(:export #:handle-get
|
||||||
#:handle-head))
|
#:handle-head))
|
||||||
(in-package #:website/routes/index)
|
(in-package #:website/routes/index)
|
||||||
|
@ -44,7 +43,6 @@
|
||||||
|
|
||||||
(defun handle-get (params)
|
(defun handle-get (params)
|
||||||
(declare (ignore params))
|
(declare (ignore params))
|
||||||
(setf (context :cache) :static)
|
|
||||||
(~page))
|
(~page))
|
||||||
|
|
||||||
; for health check
|
; for health check
|
||||||
|
|
|
@ -19,6 +19,5 @@
|
||||||
"Back to TOP"))))
|
"Back to TOP"))))
|
||||||
|
|
||||||
(defun handle-not-found ()
|
(defun handle-not-found ()
|
||||||
(setf (context :cache) :dynamic)
|
|
||||||
(setf (context :metadata) *metadata*)
|
(setf (context :metadata) *metadata*)
|
||||||
(~page))
|
(~page))
|
||||||
|
|
|
@ -19,6 +19,5 @@
|
||||||
|
|
||||||
(defun handle-get (params)
|
(defun handle-get (params)
|
||||||
(declare (ignore params))
|
(declare (ignore params))
|
||||||
(setf (context :cache) :dynamic)
|
|
||||||
(setf (context :metadata) *metadata*)
|
(setf (context :metadata) *metadata*)
|
||||||
(~page))
|
(~page))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue