diff options
| author | Fuwn <[email protected]> | 2022-04-18 04:10:00 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-18 04:10:00 -0700 |
| commit | 7878dffa113e8051bdb229b04d33bcca74f21a7e (patch) | |
| tree | b322596a1ee621defe1cb83aee61c64c3fbad971 /src/macros.rs | |
| parent | feat: show preview for searches (diff) | |
| download | locus-7878dffa113e8051bdb229b04d33bcca74f21a7e.tar.xz locus-7878dffa113e8051bdb229b04d33bcca74f21a7e.zip | |
feat: cache more dynamic routes
Diffstat (limited to 'src/macros.rs')
| -rw-r--r-- | src/macros.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/macros.rs b/src/macros.rs index f0e805f..bfaf9c2 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -18,7 +18,9 @@ #[macro_export] macro_rules! success { - ($body:expr, $context:ident) => { + ($body:expr, $context:ident) => {{ + $crate::route::cache(&$context, &$body); + Response::Success( Main { body: &$body, @@ -37,7 +39,7 @@ macro_rules! success { } .to_string(), ) - }; + }}; } #[macro_export] |