应用内存缓存增加注释
This commit is contained in:
parent
ddb12f02f3
commit
46d02fb0f3
5
library/src/cache/inner_cache.rs
vendored
5
library/src/cache/inner_cache.rs
vendored
@ -12,12 +12,17 @@ use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||
|
||||
use crate::cache::redis_cache::REDIS_CACHE;
|
||||
|
||||
/// 缓存账号信息
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct CacheAccount {
|
||||
pub account: Arc<Account>,
|
||||
pub token: Arc<String>,
|
||||
}
|
||||
|
||||
/// 内存缓存数据结构,包含缓存类型和缓存数据
|
||||
/// 缓存类型用于区分不同的缓存数据,缓存数据用于存储缓存数据
|
||||
/// S: 键值类型
|
||||
/// D: 缓存数据类型
|
||||
pub struct ServerCache<S, D> {
|
||||
pub cache: Cache<S, D>,
|
||||
pub cache_type: Arc<String>,
|
||||
|
Loading…
Reference in New Issue
Block a user