Improve cache strategy

This commit is contained in:
Akira Tempaku 2025-05-01 23:25:28 +09:00
parent 06cc61f247
commit 1b7b15da5f
Signed by: paku
GPG key ID: 5B4E8402BCC50607

View file

@ -18,12 +18,9 @@
(if (string= (hp-env) "dev") (if (string= (hp-env) "dev")
"private, no-store" "private, no-store"
(cond (cond
((eq strategy :static) ((eq strategy :static) "public, max-age=31536000, immutable")
"public, max-age=31536000, immutable") ((eq strategy :dynamic) "public, max-age=60")
((eq strategy :dynamic) (t "private, no-store")))))
"public, max-age=60 stale-while-revalidate=86400, stale-if-error=86400")
(t
"private, no-store")))))
(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")