commit 4b95f59b077a512fa1f78c4d5e506666eb3259e7
parent c953ac2c7df3a4adff539fd7399bcdfcbd41329b
Author: Silas Brack <silasbrack@gmail.com>
Date: Sat, 13 Jun 2026 15:15:47 +0200
chore: reduce static asset cache TTL to 1 day
A year-long cache for 3KB files is premature optimization that
makes CSS/JS changes invisible to users.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/routes.rs b/src/routes.rs
@@ -18,7 +18,7 @@ async fn serve_static(content_type: &'static str, body: &'static [u8]) -> Respon
Response::builder()
.status(StatusCode::OK)
.header(header::CONTENT_TYPE, content_type)
- .header(header::CACHE_CONTROL, "public, max-age=31536000")
+ .header(header::CACHE_CONTROL, "public, max-age=86400")
.body(Body::from(body))
.unwrap()
}