use actix_web::{web, HttpResponse, Responder}; use cached::proc_macro::once; use crate::{config::Config, template::Infos}; pub async fn page(config: web::Data) -> impl Responder { HttpResponse::NotFound().body(build_page(config.get_ref().clone())) } #[once(time = 60)] pub fn build_page(config: Config) -> String { config.tmpl.render("404.html", (), Infos::default()) }