aboutsummaryrefslogtreecommitdiff
path: root/src/macros.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-18 04:10:00 -0700
committerFuwn <[email protected]>2022-04-18 04:10:00 -0700
commit7878dffa113e8051bdb229b04d33bcca74f21a7e (patch)
treeb322596a1ee621defe1cb83aee61c64c3fbad971 /src/macros.rs
parentfeat: show preview for searches (diff)
downloadlocus-7878dffa113e8051bdb229b04d33bcca74f21a7e.tar.xz
locus-7878dffa113e8051bdb229b04d33bcca74f21a7e.zip
feat: cache more dynamic routes
Diffstat (limited to 'src/macros.rs')
-rw-r--r--src/macros.rs6
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]