- 添加指纹缓存迁移决策,选用零依赖的 ttlcache 库并配置单例缓存与十分钟过期时间。 - 使用 `@isaacs/ttlcache` 成功替换手动 TTL 缓存并保留请求去重逻辑,优化依赖管理与代码格式化流程。 - 添加缓存库选型说明,明确采用 @isaacs/ttlcache 提升硬件指纹功能的可维护性与稳定性。 - 添加 ttlcache 依赖以支持缓存功能 - 使用 TTLCache 替代手动缓存逻辑,提升缓存管理的可靠性和可维护性。 - 添加 @isaacs/ttlcache 依赖并指定版本 2.1.4,更新锁定文件以确保依赖一致性。 - 添加 ttlcache 依赖以支持缓存功能
9 lines
478 B
Markdown
9 lines
478 B
Markdown
## @isaacs/ttlcache Migration Learnings
|
|
|
|
- Successfully replaced manual TTL cache with `@isaacs/ttlcache` in `fingerprint.ts`.
|
|
- Use `catalog:` for dependency management in the Bun monorepo.
|
|
- `TTLCache` does not handle in-flight request deduplication, so the `inFlight` Promise pattern was preserved.
|
|
- Alphabetical sorting in `package.json` catalog is important for consistency.
|
|
- Biome handles import organization and formatting; `bun fix` should be run after manual edits.
|
|
|