Skip to main content

route_cache_dir

Function route_cache_dir 

Source
fn route_cache_dir(route: &str) -> Option<PathBuf>
Expand description

计算某路由的 SSR 缓存目录路径。

route 形如 /post/markdown-syntax-test(前导 / 可有可无)。返回 static/post/markdown-syntax-test(不含 index/,删整目录更彻底)。 对路径段做安全清洗:禁止 .. / 空段,避免越出 static/ 根。