Skip to content

Commit

Permalink
Add cache control to get chateau
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Apr 3, 2024
1 parent dab8fce commit 7c0bfe6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/birch/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ async fn chateaus(pool: web::Data<Arc<CatenaryPostgresPool>>, 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);
}
}
Expand Down Expand Up @@ -722,6 +723,7 @@ async fn chateaus(pool: web::Data<Arc<CatenaryPostgresPool>>, req: HttpRequest,

HttpResponse::Ok()
.insert_header(("Content-Type", "application/json"))
.insert_header(("Cache-Control", "max-age=86400"))
.body(serialized)
}

Expand Down

0 comments on commit 7c0bfe6

Please sign in to comment.