This commit is contained in:
2023-07-21 02:12:23 +02:00
parent 4c6686b5a9
commit a07d1a7f8b

View File

@@ -43,21 +43,21 @@ fn tuple_first_mut<A, B>(tuple: &mut (A, B)) -> &mut A {
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_live(Duration::from_secs(5 * 60)) .time_to_idle(Duration::from_secs(5 * 60))
.max_capacity(2048) .max_capacity(2048)
.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_live(Duration::from_secs(5 * 60)) .time_to_idle(Duration::from_secs(5 * 60))
.max_capacity(2048) .max_capacity(2048)
.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_live(Duration::from_secs(24 * 60 * 60)) .time_to_idle(Duration::from_secs(24 * 60 * 60))
.max_capacity(2048) .max_capacity(2048)
.build() .build()
}); });