Expand description
应用级缓存层 (Cache Layer)
基于 Tokio 异步锁的内存缓存,减少数据库查询:
| 缓存 | 用途 |
|---|---|
AuthSnapshotCache | 鉴权用组员快照(ID→Member) |
MangaTranNameCache | 漫画译名/原名 ID→名称映射 |
MemberAllCache | 全量组员列表缓存 |
EpisodeTasksCache | 待做稿件列表缓存 |
MemberTaskCountsCache | 组员任务计数缓存 |
RssFileLock | RSS 文件 per-file 互斥写锁 |
Structs§
- RssFile
Lock - RSS 文件级互斥锁管理器
Functions§
- cache_
key - 获取缓存键名
- get_
auth_ snapshot_ cached - 获取鉴权快照
- get_
episode_ tasks_ cached - 读取缓存的待做稿件,未命中返回
None - get_
member_ task_ counts_ cached - 读取缓存的组员任务计数,未命中返回
None - invalidate_
all_ auth_ snapshots - 使全部鉴权快照缓存失效
- invalidate_
auth_ snapshot - 使指定组员的鉴权快照缓存失效
- invalidate_
manga_ names - 使译名和原名列表缓存同时失效
- invalidate_
member_ all - 使全量组员列表缓存失效
- invalidate_
task_ tracking - 使稿件监控两个缓存同时失效
- member_
all_ cache_ key - 获取缓存键名
- new_
auth_ snapshot_ cache - 创建鉴权快照缓存实例
- new_
episode_ tasks_ cache - 创建待做稿件缓存实例
- new_
manga_ tran_ name_ cache - 创建译名/原名列表缓存实例
- new_
member_ all_ cache - 创建全量组员列表缓存实例
- new_
member_ task_ counts_ cache - 创建组员任务计数缓存实例
- set_
episode_ tasks_ cached - 写入待做稿件缓存
- set_
member_ task_ counts_ cached - 写入组员任务计数缓存
Type Aliases§
- Auth
Snapshot Cache - 鉴权快照缓存类型
- Episode
Tasks Cache - 待做稿件响应缓存类型
- Manga
Tran Name Cache - 译名/原名列表缓存类型
- Member
AllCache - 全量组员列表缓存类型
- Member
Task Counts Cache - 组员任务计数缓存类型