From 7dd42e4d194d3674f78e0063a44775177beee1ff Mon Sep 17 00:00:00 2001 From: Aksiome <54895777+aksiome@users.noreply.github.com> Date: Sun, 29 Dec 2024 13:57:10 +0100 Subject: [PATCH] Add sized cache --- src/api/download.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/download.rs b/src/api/download.rs index 4a7438b..13f3807 100644 --- a/src/api/download.rs +++ b/src/api/download.rs @@ -70,7 +70,7 @@ pub async fn download(Query(params): Query) -> impl IntoResponse { } } -#[cached(time = 60, result = true)] +#[cached(size = 10, time = 60, result = true)] async fn create_bundle(modules: Vec) -> Result> { let (datapacks, resourcepacks): (Vec, Vec) = modules .into_iter() @@ -128,7 +128,7 @@ async fn create_pack(modules: Vec) -> Result> { Ok(buffer) } -#[cached(time = 60, result = true)] +#[cached(size = 50, time = 60, result = true)] async fn fetch_module( module: Module, version: String,