Update caches

This commit is contained in:
2024-02-22 20:49:02 +01:00
parent b31c43f21b
commit 9987337c7f

View File

@@ -27,22 +27,22 @@ use self::internal::set_webhook;
pub static USER_ACTIVITY_CACHE: Lazy<Cache<UserId, ()>> = Lazy::new(|| { pub static USER_ACTIVITY_CACHE: Lazy<Cache<UserId, ()>> = Lazy::new(|| {
Cache::builder() Cache::builder()
.time_to_idle(Duration::from_secs(5 * 60)) .time_to_idle(Duration::from_secs(30 * 60))
.max_capacity(2048) .max_capacity(4096)
.build() .build()
}); });
pub static USER_LANGS_CACHE: Lazy<Cache<UserId, SmallVec<[SmartString; 3]>>> = Lazy::new(|| { pub static USER_LANGS_CACHE: Lazy<Cache<UserId, SmallVec<[SmartString; 3]>>> = Lazy::new(|| {
Cache::builder() Cache::builder()
.time_to_idle(Duration::from_secs(5 * 60)) .time_to_idle(Duration::from_secs(30 * 60))
.max_capacity(2048) .max_capacity(4096)
.build() .build()
}); });
pub static CHAT_DONATION_NOTIFICATIONS_CACHE: Lazy<Cache<ChatId, ()>> = Lazy::new(|| { pub static CHAT_DONATION_NOTIFICATIONS_CACHE: Lazy<Cache<ChatId, ()>> = Lazy::new(|| {
Cache::builder() Cache::builder()
.time_to_idle(Duration::from_secs(24 * 60 * 60)) .time_to_idle(Duration::from_secs(24 * 60 * 60))
.max_capacity(2048) .max_capacity(4098)
.build() .build()
}); });