Improve cache control

This commit is contained in:
Akira Tempaku 2025-03-30 17:14:24 +09:00
parent 74035544e7
commit f89513266a
Signed by: paku
GPG key ID: 5B4E8402BCC50607

View file

@ -72,10 +72,9 @@
(defmethod jingle:process-response ((app jingle:app) result)
(set-response-header :content-type "text/html; charset=utf-8")
(when (string= (hp-env) "dev")
(set-response-header :cache-control "no-store, no-cache, must-revalidate")
(set-response-header :pragma "no-cache")
(set-response-header :expires "0"))
(set-response-header :cache-control (if (string= (hp-env) "dev")
"private, no-store, no-cache, must-revalidate"
"public, max-age=0, s-maxage=60, stale-while-revalidate=600"))
(call-next-method app
(hsx:render-to-string
(match result