Improve cache control

This commit is contained in:
Akira Tempaku 2025-03-29 15:29:18 +09:00
parent 01e3911757
commit f5e31a8f94
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")
"no-store, no-cache, must-revalidate"
"public, s-maxage=60, stale-while-revalidate=59"))
(call-next-method app
(hsx:render-to-string
(match result