Skip to content

Commit

Permalink
Add sized cache
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiome committed Dec 29, 2024
1 parent 2762a92 commit 7dd42e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub async fn download(Query(params): Query<QueryParams>) -> impl IntoResponse {
}
}

#[cached(time = 60, result = true)]
#[cached(size = 10, time = 60, result = true)]
async fn create_bundle(modules: Vec<VersionedModule>) -> Result<Vec<u8>> {
let (datapacks, resourcepacks): (Vec<VersionedModule>, Vec<VersionedModule>) = modules
.into_iter()
Expand Down Expand Up @@ -128,7 +128,7 @@ async fn create_pack(modules: Vec<VersionedModule>) -> Result<Vec<u8>> {
Ok(buffer)
}

#[cached(time = 60, result = true)]
#[cached(size = 50, time = 60, result = true)]
async fn fetch_module(
module: Module,
version: String,
Expand Down

0 comments on commit 7dd42e4

Please sign in to comment.