adjust cache

This commit is contained in:
Mylloon 2023-10-21 23:08:03 +02:00
parent a37a5ccaf4
commit 19136f6c81
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 3 additions and 3 deletions

View file

@ -63,7 +63,7 @@ async fn robots() -> impl Responder {
HttpResponse::Ok().body(build_robotstxt()) HttpResponse::Ok().body(build_robotstxt())
} }
#[once(time = 60)] #[once]
fn build_robotstxt() -> String { fn build_robotstxt() -> String {
"User-agent: * Allow: /".into() "User-agent: * Allow: /".into()
} }

View file

@ -43,7 +43,7 @@ struct BlogIndexTemplate {
no_posts: bool, no_posts: bool,
} }
#[once(time = 120)] #[once(time = 60)]
fn build_index(config: Config, url: String) -> String { fn build_index(config: Config, url: String) -> String {
let mut posts = get_posts("data/blog"); let mut posts = get_posts("data/blog");

View file

@ -11,7 +11,7 @@ async fn page(req: HttpRequest, config: web::Data<Config>) -> impl Responder {
)) ))
} }
#[once(time = 60)] #[once]
fn build_page(config: Config, url: String) -> String { fn build_page(config: Config, url: String) -> String {
config.tmpl.render( config.tmpl.render(
"web3.html", "web3.html",