Optimize user langs

This commit is contained in:
2023-06-21 12:24:12 +02:00
parent 5a725eb30c
commit b62e659576
9 changed files with 43 additions and 35 deletions

View File

@@ -6,6 +6,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use axum::Router;
use smallvec::SmallVec;
use teloxide::adaptors::throttle::Limits;
use teloxide::types::BotCommand;
use tokio::time::{sleep, Duration};
@@ -25,7 +26,7 @@ use crate::config;
#[derive(Clone)]
pub struct AppState {
pub user_activity_cache: Cache<UserId, ()>,
pub user_langs_cache: Cache<UserId, Vec<String>>,
pub user_langs_cache: Cache<UserId, SmallVec<[String; 3]>>,
pub chat_donation_notifications_cache: Cache<ChatId, ()>,
}