From 7c0bfe66b68ed1a43c3c2107372b71fe074ec5f6 Mon Sep 17 00:00:00 2001 From: Kyler Chin <7539174+kylerchin@users.noreply.github.com> Date: Wed, 3 Apr 2024 04:38:30 -0700 Subject: [PATCH] Add cache control to get chateau --- src/birch/server.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/birch/server.rs b/src/birch/server.rs index c369b24b..883591d8 100644 --- a/src/birch/server.rs +++ b/src/birch/server.rs @@ -605,6 +605,7 @@ async fn chateaus(pool: web::Data>, req: HttpRequest, .as_millis() as u64 - 3_600_000 { return HttpResponse::Ok() .insert_header(("Content-Type", "application/json")) + .insert_header(("Cache-Control", "max-age=86400")) .body(cloned_chateau_data.chateau_geojson); } } @@ -722,6 +723,7 @@ async fn chateaus(pool: web::Data>, req: HttpRequest, HttpResponse::Ok() .insert_header(("Content-Type", "application/json")) + .insert_header(("Cache-Control", "max-age=86400")) .body(serialized) }