TTL
Some checks failed
CI / Check typos (push) Successful in 8s
CI / Check links (push) Failing after 10s
CI / Clippy (push) Successful in 1m0s
CI / Build and test (push) Successful in 1m18s
CI / Build container (push) Successful in 1m4s
CI / Deploy on waypoint (push) Successful in 43s

This commit is contained in:
2025-11-11 23:46:10 -08:00
parent 0da489dc1b
commit 11d7f8b0d0
3 changed files with 3 additions and 5 deletions

View File

@@ -93,9 +93,7 @@ impl Default for Page {
fn default() -> Self {
Page {
meta: Default::default(),
html_ttl: Some(TimeDelta::seconds(60 * 60 * 24 * 30)),
//css_ttl: Duration::from_secs(60 * 60 * 24 * 30),
//generate_css: None,
html_ttl: Some(TimeDelta::days(1)),
generate_html: Box::new(|_, _| Box::pin(async { html!() })),
immutable: true,
}

View File

@@ -62,7 +62,7 @@ impl Servable for Default404 {
return Rendered {
code: StatusCode::NOT_FOUND,
body: RenderedBody::String("page not found".into()),
ttl: Some(TimeDelta::days(30)),
ttl: Some(TimeDelta::days(1)),
immutable: true,
headers: HeaderMap::new(),
mime: Some(MimeType::Html),

View File

@@ -69,7 +69,7 @@ fn page_from_markdown(md: impl Into<String>, default_image: Option<String>) -> P
meta,
immutable: true,
html_ttl: Some(TimeDelta::seconds(60 * 24 * 30)),
html_ttl: Some(TimeDelta::days(1)),
generate_html: Box::new(move |page, ctx| {
let html = html.clone();