From 71e28e1ea58ea395f07816ce939e1b659eb5d48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= <7822554+AlexTMjugador@users.noreply.github.com> Date: Wed, 15 Oct 2025 20:40:47 +0200 Subject: [PATCH] fix(app-lib): cache most Modrinth data for the intended time (#4558) --- packages/app-lib/src/state/cache.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/app-lib/src/state/cache.rs b/packages/app-lib/src/state/cache.rs index 91fb6a41..a79df376 100644 --- a/packages/app-lib/src/state/cache.rs +++ b/packages/app-lib/src/state/cache.rs @@ -80,11 +80,12 @@ impl CacheValueType { } } + /// Returns the expiry time for entries of this type of cache item, in seconds. pub fn expiry(&self) -> i64 { match self { - CacheValueType::File => 60 * 60 * 24 * 30, // 30 days - CacheValueType::FileHash => 60 * 60 * 24 * 30, // 30 days - _ => 60 * 60 * 30, // 30 minutes + CacheValueType::File => 30 * 24 * 60 * 60, // 30 days + CacheValueType::FileHash => 30 * 24 * 60 * 60, // 30 days + _ => 30 * 60, // 30 minutes } }