Expand description
缓存模块:本地内存缓存 + Redis 缓存
通过配置 cache.type 切换:
local→ 内存缓存(默认)redis→ Redis 缓存(需配置 redis_url)
Structs§
- Cache
Stats - 缓存统计指标
- Local
Cache - 本地内存缓存(HashMap + RwLock + TTL + 统计 + 后台清理)
- Redis
Cache - Redis 缓存实现
Enums§
- Shared
Cache - 共享缓存——枚举包装所有缓存实现,避免
dyn Cache的对象安全问题
Traits§
- Cache
- 统一缓存接口(本地/Redis 实现同一 trait)
Functions§
- create_
cache - 从配置创建共享缓存实例