Skip to content

Commit 71e28e1

Browse files
fix(app-lib): cache most Modrinth data for the intended time (#4558)
1 parent 6dbd1e5 commit 71e28e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/app-lib/src/state/cache.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ impl CacheValueType {
8080
}
8181
}
8282

83+
/// Returns the expiry time for entries of this type of cache item, in seconds.
8384
pub fn expiry(&self) -> i64 {
8485
match self {
85-
CacheValueType::File => 60 * 60 * 24 * 30, // 30 days
86-
CacheValueType::FileHash => 60 * 60 * 24 * 30, // 30 days
87-
_ => 60 * 60 * 30, // 30 minutes
86+
CacheValueType::File => 30 * 24 * 60 * 60, // 30 days
87+
CacheValueType::FileHash => 30 * 24 * 60 * 60, // 30 days
88+
_ => 30 * 60, // 30 minutes
8889
}
8990
}
9091

0 commit comments

Comments
 (0)