cache in memory

This commit is contained in:
2026-03-23 22:14:01 +08:00
parent fae30ed97a
commit 8e386d98d0
13 changed files with 318 additions and 392 deletions

View File

@@ -12,7 +12,7 @@ pub async fn get_systemlog(
user: CurrentUser,
rh: &State<RandomHasher>,
db: Db,
mut rconn: RdsConn,
rconn: RdsConn,
) -> JsonApi {
let logs = Systemlog::get_list(&rconn, 50).await?;
@@ -20,7 +20,7 @@ pub async fn get_systemlog(
"tmp_token": rh.get_tmp_token(),
"salt": look!(rh.salt),
"start_time": rh.start_time.timestamp(),
"user_count": cached_user_count(&db, &mut rconn).await?,
"user_count": cached_user_count(&db).await?,
"custom_title": user.custom_title,
"admin_list": get_admin_list(&rconn).await?,
"candidate_list": get_candidate_list(&rconn).await?,