- 添加指纹缓存迁移决策,选用零依赖的 ttlcache 库并配置单例缓存与十分钟过期时间。 - 使用 `@isaacs/ttlcache` 成功替换手动 TTL 缓存并保留请求去重逻辑,优化依赖管理与代码格式化流程。 - 添加缓存库选型说明,明确采用 @isaacs/ttlcache 提升硬件指纹功能的可维护性与稳定性。 - 添加 ttlcache 依赖以支持缓存功能 - 使用 TTLCache 替代手动缓存逻辑,提升缓存管理的可靠性和可维护性。 - 添加 @isaacs/ttlcache 依赖并指定版本 2.1.4,更新锁定文件以确保依赖一致性。 - 添加 ttlcache 依赖以支持缓存功能
9 lines
342 B
Markdown
9 lines
342 B
Markdown
## Migration Decisions
|
|
|
|
- **Library**: `@isaacs/ttlcache` v2.1.4
|
|
- **Rationale**: Minimal, zero-dependency, specialized for TTL, well-maintained.
|
|
- **Cache Key**: Fixed string `'fingerprint'` since we only cache one result.
|
|
- **Max Items**: 1 (singleton fingerprint).
|
|
- **Default TTL**: 10 minutes (compatible with previous implementation).
|
|
|